ReferenceBuilt-in functions
str()
The readable text form of an object, from its __str__.
Signature
str(object='')Parameters
| Name | Means |
|---|---|
object | anything |
Returns
A string.
Example
Python
print(str(42) + " bottles")
print(str(3.0))
print(str([1, 2]))Output
42 bottles 3.0 [1, 2]