Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR 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)
 
PREVIOUS NEXT
Tagged: #swap #variables #variable #python
ADD COMMENT
Topic
Name
1+9 =