# a="Let‘s go "
# print(a)
# 1 * 重复输出字符串
# print(‘hello‘*20)
# 2 [] ,[:] 通过索引获取字符串中字符,这里和列表的切片操作是相同的,具体内容见列表
# print(‘helloworld‘[2:])
#关键字 in
# print(123 in [23,45,123])
# print(‘e2l‘ in ‘hello‘)
# 4 % 格式字符串
# print(‘alex is a good teacher‘)
# print(‘%s is a good teacher‘%‘alex‘)
#5 字符串连接
# a=‘123‘
# b=‘abc‘
# d=‘44‘
# # # c=a+b
# # # print(c)
# #
# c= ‘‘.join([a,b,d])
# print(c)
# st = ‘Li yong {name} is {age}‘ #格式化输出
# print(st.count(‘l‘)) #字符个数---
# print(st.capitalize()) #首字母大写
# print(st.center(50,‘-‘)) #字符串前后补充字符
# # print(st.ljust())
# # print(st.rjust())
# print(st.encode()) #解码编码
# print(st.endswith(‘L‘)) #判断结尾
# print(st.startswith(‘Li‘)) #判断开头------
# print(st.find(‘y‘)) #元素索引值 -1
# print(st.format(name=‘liyong‘,age=22)) #格式化输出----------
# print(st.format_map({‘name‘:‘liyong‘,‘age‘:22}))
# print(st.index(‘y‘)) #同find,报错
# print(st.isdigit()) #判断似数字
# print(st.isdecimal()) #判断十进制
# print(st.isidentifier()) #
# print(st.islower()) #大小写
# print(st.isupper())
# print(st.isspace())
# print(st.istitle()) #单词首字母大写
# print(st.lower())------------
# print(st.upper())----------
# print(st.strip()) #去除空格和换行符---------
# print(st.replace(‘t‘,‘a‘)) #替换-------------
# print(st.rfind(‘i‘)) #从由开始
# print(st.split(‘i‘)) #已i分割---------
# print(st.rsplit(‘i‘,1),) #
# print(st.title()) # 大写
# st.splitlines()