python
Published on January 26, 2024By DeveloperBreeze
# Two variables with initial values
a = 10
b = 20
# Swap values using tuple unpacking
a, b = b, a
# Display the swapped values
print('After swapping:')
print('a:', a) # Output: 20
print('b:', b) # Output: 10
Comments
Please log in to leave a comment.