The Python Apprentice
上QQ阅读APP看书,第一时间看更新

The str constructor

We can use the str constructor to create strings representations of other types, such as integers:

>>> str(496)
>>> '496'

Or floats:

>>> str(6.02e23)
'6.02e+23'