Advertisement
here2share

# flatten_zipped_lists.py

Jan 10th, 2024
902
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.18 KB | None | 0 0
  1. # flatten_zipped_lists.py
  2.  
  3. lista = [0, 2, 4, 6, 8]
  4. listb = [1, 3, 5, 7, 9]
  5.  
  6. merged_list = list(sum(zip(lista, listb), ()))
  7. print(merged_list)
  8.  
  9. # [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement