字符串下标与切片

 

 

字符串常用函数:

 

 

print('请输入一个字符串:')
srt1 = input()
srt2 = srt1.upper()  # 将所有小写字母转换为大写
print(srt1)
print(srt2)