Python对字符串的操作总结,适用于python2和python3
Python对字符串的操作总结,适用于python2和python3
去空格及特殊符号
s.strip().lstrip().rstrip(',')
复制字符串
#strcpy(sStr1,sStr2)
sStr1 = 'strcpy'
sStr2 = sStr1
sStr1 = 'strcpy2'
print sStr2
连接字符串
#strcat(sStr1,sStr2)
sStr1 = 'strcat'
sStr2 = '
转载
2016-01-17 11:42:01 ·
542 阅读 ·
0 评论