How to Create and Assign Strings : str « Buildin Function « Python Tutorial






aString = 'Hello World!'              # using single quotes
anotherString = "Python is cool!"     # double quotes
print aString                         # print, no quotes!

s = str(range(4))                     # turn list to string
print s








13.44.str
13.44.1.str function coerces data into a string
13.44.2.str() and repr()
13.44.3.How to Create and Assign Strings
13.44.4.table of powers using string methods