Posted on 16th September 2024| views
Utilize str() for converting the Object into a string.
Call str(object)
the_object = 35
object_string = str(the_object)
Convert `the_object` to a string
print(object_string)
OUTPUT
35
print(type(object_string))
OUTPUT
<class 'str'>
If you are looking for the Python certification course, you can check out this online Python Training and Improve your knowledge in Python.