Convert int: to and from string : String Cast « String « Python
- Python
- String
- String Cast
Convert int: to and from string

print int("42"), str(42) # convert from/to string
print "spam" + str(42) # force concatenation
Related examples in the same category