Want to become a Vibe Coder? Join Vibe Coding Training here
x
C# Corner
Tech
News
Videos
Forums
Jobs
Books
Events
More
Interviews
Live
Learn
Training
Career
Members
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Refer
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Swapping Two Numbers In Python
WhatsApp
Sr Karthiga
Aug 14
2016
1.1
k
0
0
swap.zip
x = input(
'Enter value of x: '
)
y = input(
'Enter value of y: '
)
# create a temporary variable and swap the values
temp = x
x = y
y = temp
print(
'The value of x after swapping: {}'
.format(x))
print(
'The value of y after swapping: {}'
.format(y))
swaping two number
Up Next
Swapping Two Numbers In Python