![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python易忘小技巧
Myself2018
这个作者很懒,什么都没留下…
展开
-
python字符串和列表的相互转换
一、列表转字符串:# 列表转字符串L = ['My', 'name', 'is', 'Cruise']print(''.join(L)) # ''中间的空格多少,列表对象中的元素就会距离间隔多少print(' '.join(L))输出:MynameisCruiseMy name is Cruise二、字符串转列表:# 字符串转列表str123 = "My name is Cruise."...原创 2018-05-24 23:17:46 · 1933 阅读 · 2 评论 -
Python中取整的几种方法小结
点击打开链接转载 2018-07-07 12:12:22 · 2229 阅读 · 0 评论