What does str in python mean?

藏色散人
Release: 2019-06-24 10:33:11
Original
16224 people have browsed it

What does str in python mean?

#What does str in python mean?

The str() function in python converts objects into a form suitable for human reading.

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

class str(object='')
Copy after login

Parameters

object -- object.

Return value

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'}"
>>>
Copy after login

Related recommendations: "Python Tutorial

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

Related labels:
source:php.cn
Statement of this Website
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 [email protected]
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!