教程集 www.jiaochengji.com
教程集 >  脚本编程  >  php  >  正文 str python是什么意思

str python是什么意思

发布时间:2020-10-09   编辑:jiaochengji.com
教程集为您提供str python是什么意思等资源,欢迎您收藏本站,我们将为您提供最新的str python是什么意思资源

str python是什么意思?

python中str是一个内置函数,str()函数将对象转化为适于人阅读的形式。

语法

以下是 str() 方法的语法:

class str(object='')

参数

object -- 对象。

返回值

返回一个对象的string格式。

实例

以下展示了使用 str() 方法的实例:

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

相关推荐:《Python教程》

以上就是str python是什么意思的详细内容,更多请关注教程集其它相关文章!

  • 本文原创发布教程集,转载请注明出处,感谢您的尊重!
  • 您可能感兴趣的文章:
    str python是什么意思
    python里的str是什么意思
    python中swapcase是什么意思
    python里len什么意思
    python len什么意思
    python中encoding是什么意思
    python中的%是什么意思
    python中index是什么意思
    python冒号是什么意思
    python index函数是什么意思

    [关闭]
    ~ ~