Use
var = input("Input the variable")
print("Your variable is " + var)
Note that var
must be a string, if it isn't, convert it to a string with var = str(var)
.
For example
var = 5 # This is an integer, not a string
print("Var is " + str(var))
This solution is the easiest to read/understand, so better for beginners, as it is just simple string concatenation.