Commit ae461608 by BellCodeEditor

save project

parent 5e7737c5
Showing with 3 additions and 2 deletions
...@@ -15,4 +15,5 @@ print(hero) ...@@ -15,4 +15,5 @@ print(hero)
print('i =',i) print('i =',i)
print('len =',len(hero)) print('len =',len(hero))
#臂力大王 #臂力大王
print("臂力大王是:",hero[-7:-1]) print("臂力大王是:",hero[10:1:-2]) #从右往左
\ No newline at end of file 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