TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Swapping Two Numbers In Python
Sr Karthiga
Aug 14
2016
Code
1.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
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