python字符串的运算有哪些

python字符串的运算有哪些

1,链接符号 +

2,判断字符串是否在某个字符串中 ‘s’ in ‘this’ 返回bool

3,字符串索引 a="this a my" a[0],a[-1],a[1:4],a[1:],a[1:4:2]

 

posted @ 2017-11-16 20:04  学无边涯  阅读(783)  评论(0编辑  收藏  举报