x.pop(3:) SyntaxError: invalid syntax

>>> x.pop(3:)
  File "<stdin>", line 1
    x.pop(3:)
           ^
SyntaxError: invalid syntax
>>> x=x[:4]
>>> x
[11, 22, 33, 5]
>>> x.append('hello')
>>> x
[11, 22, 33, 5, 'hello']
>>> x.index(2)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: 2 is not in list
>>> x.index(22)
1
>>> 2 in x
False
>>> 22 in x
True
>>>

 

posted @ 2018-01-17 13:58  sky20080101  阅读(370)  评论(0)    收藏  举报