Python字符串连接和截取
2018-04-27 本文已影响0人
少女萌的进击之路
str1='1596456'
str2='3574'
print str1+str2 字符串连接
print str1[2] 截取str1的第三个字符
print str1[2:5] 截取str1的第三个到第五个字符
str1='1596456'
str2='3574'
print str1+str2 字符串连接
print str1[2] 截取str1的第三个字符
print str1[2:5] 截取str1的第三个到第五个字符