Skip to content

Instantly share code, notes, and snippets.

@pedrovhb
Created June 6, 2017 01:12
Show Gist options
  • Save pedrovhb/41f6b9dffd796a197df56dffca0b5f01 to your computer and use it in GitHub Desktop.
Save pedrovhb/41f6b9dffd796a197df56dffca0b5f01 to your computer and use it in GitHub Desktop.
s1 = '13579'
s2 = '24680'
s3 = ''.join([s1[i//2] if i % 2 == 0 else s2[i//2] for i in range(len(s1 + s2))])
print(s3) # 1234567890
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment