Mega Code Archive

 
Categories / Python / Buildin Function
 

Str Function

# The str function coerces data into a string.  # Every datatype can be coerced into a string. str(1)                                              horsemen = ['war', 'pestilence', 'famine']  print horsemen  horsemen.append('Powerbuilder')  print str(horsemen)