# str 类,字符串
# name ='alex' # 首字母变大写
# test ='alex'
# v= test.capitalize()
# print(v)
#
# 大写全部变小写
# test ='aLExALEX'
# v= test.lower()
# print(v)
# 功能与lower的效果一样。但如果是他国的语言casefold比lower效果更好。
# test ='alexALEX'
# v= test.casefold()
# print(v) # 大小写转换: 大写变小写 小写变大写
# test ='alexXXFFFEe'
# v = test.swapcase()
# print(v)
#
#
# 从开始往后找,找到第一个之后,获取其未知
# > 或 >=
# test ='penphypenphy'
# v = test.find('e',5,8)
# print(v)
# 输出7
#
#
# 格式化,将一个字符串
# test ='i am {name},age {a}'
# print(test)
# v = test.format(name='penphy',a='19')
# print(v)
#
# 下面的例子得 count是计算p在 penphy字符串中出现的次数,从多少至多少
# test = 'penphy'
# v = test.count('p',0,100)
# print(v) # 设置宽度并将内容居中
# 20 代指总长度
# 空白未知填充,一个字符,可有可无
# test ='penphy'
# v = test.center(20,'*')
# print(v)
# 输出:*******penphy******* # ljust是把字放左边
# test ='alex'
# v =test.ljust(20,'*' )
# print(v)
# 输出:alex**************** # rjust是把字放右边
# v1 =test.rjust(20,'*')
# print(v1)
# 输出:****************alex # 只能用0来填充,不怎么使用
# test ='penhy'
# v = test.zfill(8)
# print(v)
# 输出:000penhy # expandtabs,断句20.比如tab会补齐username缺的空格,以此类推
# test = 'username\temail\tpassword\nlaiying\tying@qq.com\t123\nlaiying\tying@qq.com\t123\nlaiying\tying@qq.com\t123'
# v= test.expandtabs(20)
# print(v)
#
#
# 检测字符串中是否只包含 字母和数字
# test = 'abc123'
# v = test.isalnum()
# print(v)
# 检测字符串中是否只由字母组成
# test = 'penophy'
# v = test.isalpha()
# print(v)
#
# 判定字符串里输入的是否是数字
# test ='二'
# v1 = test.isdecimal() 十进制的小数,但不支持中文表示的数字
# v2 =test.isdigit() 支持特殊的符号,但不支持中文表示的数字
# v3 =test.isnumeric() 全都支持
# print(v1,v2,v3) # 字母,数字,下划线 :数字不能开头 只要符合这个条件的 就是 '标识符' def class符合前面的规则 比如:
# a ='123'
# v =a.isidentifier()
# print(v)
#
# import keyword
# print(keyword.iskeyword('def'))
# test ='def'
# v =test.isidentifier()
# print(v) # 是否存在不可显示的字符
# \t 制表符
# \n 换行
# test ='asdasdsad\n'
# v =test.isprintable()
# print(v) # 判断是否全部是空格
# test =' '
# v =test.isspace()
# print(v) # 判断是否是标题,首字母需大写
# test = 'Return True if all characters in S are alphabetic'
# v1 = test.istitle()
# print(v1) False
# v2 = test.title()
# print(v2) Return True If All Characters In S Are Alphabetic
# v3 = v2.istitle()
# print(v3) True
# 输出: ↑ # 将字符串中的每一个元素按照指定分隔符进行拼接-----重要
# test = '你是风儿我是沙'
# print(test)
# t =' '
# v = ' '.join(test)
# print(v) # 判断是否全部为大小写 和 转换为大小写
# test ='Alex'
# v1 =test.islower()
# v2 =test.lower()
# print(v1,v2)
# 输出:False alex
# v1 =test.isupper()
# v2 =test.upper()
# print(v1,v2)
# 输出:False ALEX # 去除左边空白
# test ='alex'
# v =test.lstrip()
# print(v)
# 去除右边的空白
# v =test.rstrip()
# print(v)
# 去除两边的空白
# v=test.strip()
# print(v) # test ='\nalex'
# print(test)
# 去除\t,\n
# v =test.lstrip()
# print(v) # 移除指定字符串
# 有限匹配↓
# 去除左边的指定字符
# test ='xalex'
# v= test.lstrip('xa')
# print(v)
# 输出:lex
# 去除右边的指定字符 先进行最多匹配
# v= test.rstrip('9lexxex')
# print(v)
# 输出:xa
# 去除两边的指定字符
# v1 =test.strip('x')
# print(v1)
# 输出:ale # v ="eawesadasdasgffdgsergerherg.ergerg"
# m =str.maketrans('aeiou','12345')
# new_v =v.translate(m)
# print(new_v)
# 输出:21w2s1d1sd1sgffdgs2rg2rh2rg.2rg2rg # 做分割:↓
# 用法区别:partition 包含分割的元素 split不包含分割的元素
# test ='dsfsdfsdrewrdddfsdsfds'
# v =test.partition('s')
# print(v)
# 输出:('d', 's', 'fsdfsdrewrdddfsdsfds')
# v =test.rpartition('sf')
# print(v)
# 输出:('dsfsdfsdrewrdddfsd', 'sf', 'ds')
# split的弊端是不能提取 使字符串分割的值 比如下面的's'
# test ='qwesxcxzsadsadasdasf'
# v = test.split('s')
# print(v)
# 输出:['qwe', 'xcxz', 'ad', 'ada', 'da', 'f']
# v = test.split('s',3)
# print(v)
# 输出:['qwe', 'xcxz', 'ad', 'adasdasf'] # 分割,只能根据True,False:是否保留换行
# test ='sadasdaewq\nasdsasldksal\n'
# v = test.splitlines(True)
# print(v) # 替换:
# test ='alexalexalex'
# v = test.replace('ex','bbb')
# print(v)
# 输出:albbbalbbbalbbb
# v =test. replace('ex','bbb',2)
# print(v) ↓
# 输出:albbbalbbbalex 替换前2个字符 # 以xxxx开头,以xx结尾
# test = 'backhand1.1.1'
# v =test.startswith('ba')
# print(v)
# v =test.endswith('1')
# print(v) # 字符串一旦创建就不可修改
# 一旦修改或者拼接,都会造成重新生成字符串
# name ='sunpengfei'
# age = '18'
# info = name + age
# print(info) # 索引,下标,获取字符串中的某一个字符
# test ='alexjk'
# v = test[3]
# print(v)
# 输出:x # 切片
# v = test[0:-1] #0=< <-1
# print(v)
# 输出alexj # len获取当前字符串中由多少个字符组成
# test ='alexad'
# v =len(test)
# print(v)
# 输出:6 # 注意:
# v =len('asdasd')
# v ='_'.join('dasdasdas')
# print(v) # li = [11,22,33,44,55,'sad']
# len('sadsadasdasd')
# len(li) # test ='妹子有本事你到我床上来'
# index = 0
# while index< len(test):
# v = test[index]
# print(v)
# index +=1
# print('=====================')
# for循环: # for 变量名 in 字符:串
# for i in test:
#print(i) # test ='妹子有本事你到我床上来'
# for item in test:
# print(item)
# break # for item in test:
# continue
# print(item) # range:帮助创建连续的数字,通过设置步长来指定不连续
# v = range(0,100,5)
# # print(v)
# for item in v:
# print(item) # test =input('>>>')
# print(test)
# l =len(test)
# print(l)
#
# r = range(0,l)
# for item in r:
# print(item, test[item])
# 总结上面的:
# test = input('>>>')
# for item in range(0,len(test)):
# print(item,test[item]) s = ' ' while True:
v1 = input('>>>')
v2 = input('>>>')
v3 = input('>>>')
template = '{0}\t{1}\t{2}\n'
v = template.format(v1, v2, v3)
s = s + v
break
print(s.expandtabs(20))