How to Swap Value in Python without Using Third Variable

How to Swap Value in Python without Using Third Variable

How to Swap Value in Python without Using Third Variable
How to Swap Value in Python without Using Third Variable

Python Program to Swap Two Variable

a= int(input(“Enter Value of a: “)

b= int(input(“Enter Value of b: “)

print(“Before Swap Value of a: “,a)

print(“Before Swap Value of b: “,b)

a, b = b, a

print(“After Swap Value of a: “,a)

print(“After Swap Value of b: “,b)


Output

Enter Value of a: 5

Enter Value of c:  2

Before Swap Value of a: 5

Before Swap Value of b: 2

After Swap Value of a: 2

After Swap Value of b: 5


Important Question Answer

Click Here for Important Question-Answer – Computer

Click Here for Important Question-Answer – Indian Geography

Click Here for Important Question-Answer – World Geography

Click Here for Important Question-Answer – Indian History

Click Here for Important Question-Answer – Economy


Click Here To Go To Home Page and Get More Knowledge

इसी प्रकार की महत्वपूर्ण जानकारी प्राप्त करने के लिए यहाँ Click करके Whats App Channel पर Follow Button को Select कर सकते हैं

Leave a Comment

x
Scroll to Top