字符串方法:
1、capitalize():首字母大写
>>> str="abcdef"
>>> str.capitalize()
'Abcdef'
2、count()
格式:count(sub, start=None, end=None)
统计sub子字符串在字符串start和end位置中出现的次数。不指定start和end,则为整个字符串范围。
>>> str="abcdefabc"
>>> str.count("ab",3,8)
1
3、endswith()
判断字符串以什么结尾,返回True或者False
>>> str="abcdefab"
>>> str.endswith("ab")
True
4、find()
找子串,返回开头的索引
>>> str="abcdefab"
>>> str.find(