Login
Remember
Register
Ask a Question
In-place swapping of two numbers in python
0
votes
asked
May 24, 2020
in
Python
by
SakshiSharma
In-place swapping of two numbers
#python-programs
#python-swap-number-program
#program-swap-numbers
Python-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
0
votes
answered
May 24, 2020
by
Robindeniel
p, q = 20, 40
print(p, q)
p, q = q, p
print(p, q)
Output:
20 40
40 20
...