swapping, str and int cant be added in python . but in java script can be

*** in python we cant add(concatenate) string and integer both, but we can in java script  ***

x=100

y=120
print("initial values")
print("x:"+str(x))
print("y:"+str(y))
x,y=y,x
print("final values")
print("y:"+str(y))
print("x:"+str(x))

"C:\Users\darul Haram\PycharmProjects\pythonProject2\venv\Scripts\python.exe" "C:/Users/darul Haram/PycharmProjects/pythonProject2/venv/Lib/swapping.py"
initial values
x:100
y:120
final values
y:100
x:120

Process finished with exit code 0

Comments

Popular posts from this blog

XAMPP, SQL BASIC COMMANDS

The Minion Game Hackerrank Solution

Arrays - DS | HackerRank Solutions