You are viewing a single comment's thread. Return to all comments →
def string(s): even_char = s[::2] odd_char = s[1::2] return f"{even_char} {odd_char}" t = int(input()) for i in range(t): s = input() print(string(s))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 6: Let's Review
You are viewing a single comment's thread. Return to all comments →
def string(s): even_char = s[::2] odd_char = s[1::2] return f"{even_char} {odd_char}" t = int(input()) for i in range(t): s = input() print(string(s))