thinking

one platform thousands thinking

Stackoverflow经典Python问答

1. python的string相加

That said, if you're aiming for something like Java's StringBuilder, the canonical Python idiom is to add items to a list and then use str.join to concatenate them all at the end:

l = [] 
l
.append('foo')
l.append('bar')
l
.append('baz')

s
= ''.join(l)



以下是转自 https://github.com/qiwsir/StackOverFlowCn/blob/master/README.md
 

如果你是一名自诩为程序员的,那么,就必须知道stackoverflow.com这个网站。因为它是一个非常好的技术问答网站,里面不仅有高手,更重要的是有对问题进行详细耐心解答的高手。

这里我抽空翻译了一些典型的问答,当然,只能翻译Python语言方面的,其它语言,唯恐因知之甚少而漏洞百出,即便是Python,也会因为才疏学浅,在翻译过程中感到惶恐。所以,读者如果看到错误之处,请不吝赐教。

欢迎访问:www.itdiffer.com,加入学习Python的群组。

#目录

##基本对象和语句

##文件

##函数和类

##系统

##网络

posted on 2018-05-30 18:26 lau 阅读(117) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: