print function in python
mirch_palpal

can we add "str" and "int" in one single print function without using .format .if no plz explain.
print("hello World")
x =int(input("Enter any number:-"))
y=int(input("Enter any number:-"))
z=int(x+y)
print(type(z))
print(z)
print("the sum of"+x +" and "+y +" is" +z )

You are viewing a single comment. View All
Lord_Poseidon

Yes! Use str(i) for changing an integer i into string