Skip to content

Instantly share code, notes, and snippets.

@brockthebear
Created April 25, 2017 18:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brockthebear/479fd88f45e3e61c93f58b6e04c6b918 to your computer and use it in GitHub Desktop.
Save brockthebear/479fd88f45e3e61c93f58b6e04c6b918 to your computer and use it in GitHub Desktop.
import sys
t = int(sys.stdin.readline())
for i in range(0, t):
arg = sys.stdin.readline()
even = []
odd = []
for x in range(0, len(arg)):
if x % 2 == 0:
even.append(arg[x].strip())
else:
odd.append(arg[x].strip())
print("{0} {1}".format(''.join(even), ''.join(odd)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment