Commit 9c853558 by BellCodeEditor

save project

parent acb6f2f6
Showing with 4 additions and 4 deletions
......@@ -121,15 +121,15 @@ print(string[-10:-4:6])
"""
#题目:截取"llo w"
string = "Hello world"
string = "Hello world!"
print(string[2:7])
print(string[2:-4])
print(string[-9:7])
print(string[-9:-4])
print("string[2:7]=",string[2:7])
print("string[2:-4]=",string[2:-4])
print("string[-9:7]=",string[-9:7])
print("string[-9:-4]=",string[-9:-4])
print("string[2:-5]=",string[2:-5])
print("string[-10:7]=",string[-10:7])
print("string[-10:-5]=",string[-10:-5])
......
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