Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

assign more than one variable at a time on a single line in python

x, y = 5, 11
print(x)
print(y)
# 5
# 11

x, y = (5, 11)
print(x)
print(y)
# 5
# 11
Comment

PREVIOUS NEXT
Code Example
Python :: waitress 
Python :: semicircle 
Python :: List Get Sublist 
Python :: pandas column rgeex doesnot contain 
Python :: Tuple: Tuple cannot change 
Python :: value counts normalize 
Python :: find the middle of the document in the image opencv 
Python :: python inline web server 
Python :: python top label plot 
Python :: add months to date python 
Python :: django get all models 
Python :: Make exact copy of an environment 
Python :: striding in python 
Python :: text files to words generator 
Python :: how to recover a list from string in python 
Python :: sorting-a-python-list-by-two-fields 
Python :: clicking items in selenium 
Python :: odoo - add one2many field programmatically 
Python :: new line in jupyter notebook markdown 
Python :: how to make a square shape in python 
Python :: binarize array python 
Python :: python pycharm 
Python :: how to use google translate api in python 
Python :: pandas select only earliest event for duplicates 
Python :: matplotlib colorbar reverse direction 
Python :: python error catching of modules 
Python :: write a variable and assin a string to it 
Python :: show every second xtick 
Python :: installing django on windows 
Python :: Arduino - Send Commands with Serial Communication with python 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =