You are viewing a single comment's thread. Return to all comments →
In Python
def test_case(): s = input() e=[] o=[] for k in range(len(s)): if k%2==0: e.append(s[k]) else: o.append(s[k]) s= f"{"".join(e)} {"".join(o)}" return s
for i in range(int(input())): print(test_case())
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 →
In Python
def test_case(): s = input() e=[] o=[] for k in range(len(s)): if k%2==0:
e.append(s[k]) else: o.append(s[k]) s= f"{"".join(e)} {"".join(o)}" return s
for i in range(int(input())): print(test_case())