Home >Backend Development >Python Tutorial >str python what does it mean

str python what does it mean

藏色散人
藏色散人Original
2019-10-15 11:15:434410browse

str python what does it mean

str What does python mean?

Str in Python is a built-in function. The str() function converts objects into a form suitable for human reading.

Syntax

The following is the syntax of the str() method:

class str(object='')

Parameters

object -- object.

Return value

Returns the string format of an object.

Example

The following shows an example of using the str() method:

>>>s = 'RUNOOB'
>>> str(s)
'RUNOOB'
>>> dict = {'runoob': 'runoob.com', 'google': 'google.com'};
>>> str(dict)
"{'google': 'google.com', 'runoob': 'runoob.com'}"
>>>

Related recommendations: "Python Tutorial"

The above is the detailed content of str python what does it mean. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn