标签:字符 换行 hello div span int 制表符 color welcome
aStr = ‘hello wel\rcome \t to \t zy \n oYeah‘ print(‘‘.join(aStr.split()))
首先奖原字符串进行分割,然后组合
split() --> [‘hello‘, ‘wel‘, ‘come‘, ‘to‘, ‘zy‘, ‘oYeah‘]
join() --> hellowelcometozyoYeah
标签:字符 换行 hello div span int 制表符 color welcome
原文地址:https://www.cnblogs.com/zydeboke/p/11218140.html