python 字符词串和字符串的转换

type(' i am ')

str
type(''.join('i am'))

str


''.join('sda sadaa')

'sda sadaa'

 

q=str('i am the teacher').split()
q

['i', 'am', 'the', 'teacher']

''.join(q)
'iamtheteacher'

posted on 2017-12-19 19:49  mdumpling  阅读(246)  评论(0编辑  收藏  举报

导航