Search
 
SCRIPT & CODE EXAMPLE
 

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)]
Comment

PREVIOUS NEXT
Code Example
Python :: python pad with zeros 
Python :: play mp3 file python 
Python :: how to input a string in streamlit 
Python :: html to docx python 
Python :: python get directory of current script file 
Python :: python3 change file permissions 
Python :: decorator python 
Python :: Python Program to Convert Decimal to Binary, Octal and Hexadecimal 
Python :: python make directory tree from path 
Python :: python check if string is int 
Python :: how to load keras model from json 
Python :: button size tkinter 
Python :: how to print sum of two numbers in python 
Python :: spacy load en 
Python :: how to import a python function from another file 
Python :: python bold text in terminal 
Python :: beautifulsoup remove element 
Python :: python make sound when finished 
Python :: dataframe groupby multiple columns 
Python :: python replace accented characters code 
Python :: except python 
Python :: copy a dict in python 
Python :: change directory in python script 
Python :: python with statement file does not exist exception 
Python :: how to sort tuples in list python 
Python :: how to print two lists side by side in python 
Python :: get python path 
Python :: random python 
Python :: pathlib path python 
Python :: pandas create a calculated column 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =