sText ='\'Programming\'itself is the best way to learn programming.\n\t-Nobody'print(sText.strip())
sText ='\'Programming\'itself is the best way to learn programming.\n\t-Nobody\tand end here.'print(sText.strip())
输出
'Programming'itself is the best way to learn programming.-Nobody
'Programming'itself is the best way to learn programming.-Nobody and end here.
When I stand before thee at the day's end, thou shalt see my scars and know that I had my wounds and also my healing.
当日子完了,我站在你的面前, 你将看到我的疤痕,知道我曾经受伤,也曾经痊愈。
[]
When I stand before thee at the day's end, thou shalt see my scars and know that I had my wounds and also my healing.
当日子完了,我站在你的面前, 你将看到我的疤痕,知道我曾经受伤,也曾经痊愈。
When I stand before thee at the day's end, thou shalt see my scars and know that I had my wounds and also my healing.["When I stand before thee at the day's end, thou shalt see my scars and know that I had my wounds and also my healing.\n", '当日子完了,我站在你的面前, 你将看到我的疤痕,知
道我曾经受伤,也曾经痊愈。']
列表转换为字符串
#列表转换为字符串
l =['a','b']print(str(l))print(''.join(l))