按要求实现每个功能
name =" aleX" #去掉两边空格 print(name.strip()) print(name.startswith('al')) print(name.endswith('X')) name2 = name. replace ('l','p') print(name2) print(name.split( 'l')) print(name.upper()) print(name.lower()) print(name[1]) print(name[0:2]) print(name[-1:-3:-1]) print(name[-2:]) print(name.index('e')) print(name[0:-1])