Advertisement
PROTOLO

List Comprehension with Multivariable Assigment

Oct 3rd, 2022
1,246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.09 KB | Software | 0 0
  1. items = ["item1", "item2", "item3"]
  2. x, y, z = [items[i] for i in range(0,3)]
  3.  
  4. print(x,y,z)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement