You are viewing a single comment's thread. Return to all comments →
t = int(input()) for _ in range(t): S = input().strip() even_index = [] odd_index = [] for i, char in enumerate(S): if i % 2 == 0: even_index.append(char) else: odd_index.append(char) print("".join(even_index), "".join(odd_index))
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 →