Skip to content

Instantly share code, notes, and snippets.

@Nditah
Created March 29, 2018 10:54
Show Gist options
  • Save Nditah/5ac310ec40cd57cb4703e7d2bbb32e37 to your computer and use it in GitHub Desktop.
Save Nditah/5ac310ec40cd57cb4703e7d2bbb32e37 to your computer and use it in GitHub Desktop.
String to Array
if __name__ == '__main__':
N = int(input())
i=0
while i < N:
S = str(input())
strlen = len(S)
j = 0
even = ""
odd = ""
while j < strlen:
if j%2 == 0:
even +=S[j]
else :
odd +=S[j]
j +=1
print(even + " " + odd)
i +=1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment