-
-
Save pedrovhb/41f6b9dffd796a197df56dffca0b5f01 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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