age = input("What age are you: ")
agestring = str(age)
print "You are " + agestring
Although, I saw that their is an easier way to convert a numerical value to a string without having to use the str() function.
I though all you had to do is this
age = input("What age are you: ")
print "You are " + 'age'
But this just recongnises the word age as a string, anyone know how you do this?
Thanks.


Sign In
Create Account

Back to top










