You are viewing a single comment's thread. Return to all comments →
N = int(input()) for T in range(0, N): S = input() even="" odd="" current_index=0 if len(S) >= 2 and len(S) <= 10000: for elements in S: index = S.index(elements, current_index, len(S)) if (index % 2 == 0 or index == 0): even = even + S[index] current_index = index+1 elif (index % 2 != 0 or index != 0): odd = odd + S[index] current_index = index+1 print(f'{even} {odd}')
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 →