Skip to content

Instantly share code, notes, and snippets.

@Fifan31
Last active December 8, 2016 10:30
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 Fifan31/7dab93191e0a0a3131a74a956650ab74 to your computer and use it in GitHub Desktop.
Save Fifan31/7dab93191e0a0a3131a74a956650ab74 to your computer and use it in GitHub Desktop.
Python - merge 2 lists
list1 = ['a', 'c', 'e']
list2 = ['b', 'd', 'f']
list3 = [ item for tmp in zip(list1, list2) for item in tmp]
# list3 = ['a', 'b', 'c', 'd', 'e', 'f']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment