Python str() FunctionPython str() converts a specified value into a string. SignatureParametersobject : It is the encoding of the object. The default value is UTF-8. encoding : It is the encoding of the object. The default value is UTF-8. errors : It specifies the actions that need to be performed if the decoding fails. ReturnIt returns a string object. Python str Function Example 1The below example shows the working of str(). Output: '4' Explanation: In the above example, we have taken a string value 4 in the str and returns a string '4' as an output. Next TopicPython Built in Functions |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India