I have been trying to convert an integer into a string. My codes are as follows:
n = 357
x = str(n)
print x
The problem is that online editors that I have tried are not printing the string as '357'. Instead the string is printed as 357. What have I been doing wrong?
print. What significance do the'have here? If you want the'printed useprint repr(x).''defines a string literal but is not part of the string's characters. By default,printonly prints the contained characters.print type(x).