Skip to content

Instantly share code, notes, and snippets.

@Celia-code
Created May 1, 2020 03:57
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/bf9dd008f30d959f3e5943f5ea9400af to your computer and use it in GitHub Desktop.
Save Celia-code/bf9dd008f30d959f3e5943f5ea9400af to your computer and use it in GitHub Desktop.
列表
x = [1, 2, 3]
a = x.remove(2)
print('列表變為', x, '返回值為', a)
# 移除不存在於列表的元素:
print(x.remove(5))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment