共八种方法 method()
#<str>.<method>.py
str = "Great Day"
#str.lower()/str.upper()
print("1.{}".format(str.lower()))
print("2.{}".format(str.upper()))
#str.center(width[,fillchar])以str为中心,两侧填充char
print("8.{}".format(str.center(20,"=")))
#str.count(sub)返回子串sub出现的次数
print("3.{}".format(str.count("a")))
#str.join(iter)在iter元素间插入str
print("7.{}".format(" ".join(str)))
#str.replace(old,new)用新字符串new代替str的旧子串
print("6.{}".format(str.replace("ay","og")))
#str.split(sep=None)以子串为分割点放回序列
print("4.{}".format(str.split(sep=None)))
print("4(1).{}".format(str.split(sep="ea")))
#str.strip(chars)从str中去除chars左侧或右侧含有的字符
print("5.{}".format(str.strip("G Dy")))