Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to swap two variables without using third variable python

a = 10
b = 20

print(a, b)

a = a + b
b = a - b
a = a - b

print(a, b)
Comment

PREVIOUS NEXT
Code Example
Python :: a string starts with an uppercase python 
Python :: conda create environment python 3 
Python :: if-else 
Python :: httplib python 
Python :: ordenar lista decrescente python 
Python :: python tkinter code example 
Python :: python join list 
Python :: z score formula in pandas 
Python :: seaborn plot histogram for all columns 
Python :: wikipedia python module 
Python :: openpyxl read sheet row by row 
Python :: cv2 imwrite 
Python :: install json on python 
Python :: convert pandas.core.indexes.numeric.int64index to list 
Python :: Scrapping tables in an HTML file with BeautifulSoup 
Python :: python def 
Python :: enumarate in python 
Python :: python primes 
Python :: assosciate keys as list to values in python 
Python :: iterate through a list 
Python :: Python dir() built-in function 
Python :: pandas show full columns 
Python :: dataframe subtract value from previous row 
Python :: write in entry() in tkinter 
Python :: reverse function python 
Python :: python sys.argv exception 
Python :: how to compare values in dictionary with same key python 
Python :: epoch to gmt python 
Python :: python convert list of lists to array 
Python :: yield python 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =