Created
May 1, 2020 03:57
-
-
Save Celia-code/bf9dd008f30d959f3e5943f5ea9400af to your computer and use it in GitHub Desktop.
列表
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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