Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Last active April 21, 2020 12:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Celia-code/edfb17bba4be47c2fb4977ebc5b7a564 to your computer and use it in GitHub Desktop.
Save Celia-code/edfb17bba4be47c2fb4977ebc5b7a564 to your computer and use it in GitHub Desktop.
字符串
numbers = '123456789'
numbers[start:end:step] # [開始位置:結束位置:間隔]
n = numbers[0:3]
print(n)
# 打印出1,2,3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment