Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to pair up two lists in python

x = [1, 2, 3]
y = [4, 5, 6]
l = list(zip(x, y))
print(l)
>>> [(1, 4), (2, 5), (3, 6)]
 
PREVIOUS NEXT
Tagged: #pair #lists #python
ADD COMMENT
Topic
Name
9+3 =