Commit 6476c3c6 by BellCodeEditor

auto save

parent 248b33e8
Showing with 3 additions and 1 deletions
......@@ -15,8 +15,9 @@ print(hero)
print('i =',i)
print('len =',len(hero))
#臂力大王
#added by teacher
print("臂力大王是",hero[-6:])
print("臂力大王是",hero[:-1])
print("臂力大王是:",hero[1:10:-2]) #
print("臂力大王是:",hero[1:10:2]) #
print("臂力大王是:",hero[10:1:-2]) #从右往左
print("臂力大王是:",hero[-1:-10:-2]) #负索引
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment