立即学习:https://edu.csdn.net/course/play/23465/266583?utm_source=blogtoedu
>>> st=[3, 4, 40, 34]
>>> st.remove(40)
>>> print st
[3, 4, 34]
>>> st.remove(2)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: list.remove(x): x not in list
>>> st.remove[2]
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: 'builtin_function_or_method' object has no attribute '__getitem__'
>>>