完整地址:
http://www.cnblogs.com/emanlee/p/3616755.html
1.生成字符串变量
str='python String function'
2.字符串长度获取:len(str)
例:print '%s length=%d' % (str,len(str))
3.连接字符串
sStr1 = 'strcat'
sStr2 = 'append'
sStr1 += sStr2
print sStr1
4.复制字符串
strcpy(sStr1,sStr2)
sStr1 = 'strcpy'
sStr2 = sStr1
sStr1 = 'strcpy2'
print sStr2
5.比较字符串
strcmp(sStr1,sStr2)
sStr1 = 'strchr'
sStr2 = 'strch'
print cmp\(sStr1,sStr2\)
详细地址:http://www.runoob.com/python/python-strings.html
1.Python访问字符串中的值
2.Python字符串更新
3.Python转义字符
4.Python字符串运算符
5.Python字符串格式化
6.Python三引号(triple quotes)
7.Unicode 字符串
8.python的字符串内建函数