DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
Swapping Variables
x
=
10
y
=
11
x
,
y
=
y
,
x
"Swapping by simultaneously creating a tuple and unpacking it"
print
(
x
,
y
)
PREVIOUS
NEXT
Tagged:
#Swapping
#Variables
ADD COMMENT
Topic
COMMENT
Name
5+2 =
Submit