day1 作业
作业:
写代码,有如下变量,请按照要求实现每个功能:name = ' aleX'
1.name = ' aleX'
print(name,name.strip())
2.print(name.startswith('al'))
3.print(name.endswith('X'))
4.print(name.replace('l','p'))
5.print(name.split('l'))
6.print(name.upper())
7.print(name.lpwer())
8.print(name[1])
9.print(name[:3])
10.print(name[-2:])
11.print(name.find('e'),name.rfind('e'))
12.print(name.[:-1])