python作业6月11日

name=" aleX"
print(name)
print(name.strip())
print(name.startswith("al"))
print(name.endswith("X"))
print(name.replace("l","p"))
print(name.split("l"))
print(name.upper())
print(name.lower())
print(name[1])
print(name[0:3])
print(name[-2:])
print(name.index("e"))
print(name[:-1])
posted @ 2019-06-11 17:39  骧骧骧骧  阅读(206)  评论(0编辑  收藏  举报