如何使用 python 删除 first 和 last 值=A 0006 005C 0078 0030 0034 0046 0030 00
请您参考如下方法:
您可以使用列表切片:
>>> a = ["one", "two", "three", "four"]
>>> a[1:-1]
['two', 'three']
参见 Good Primer for Python Slice Notation有关此表示法如何工作的更多详细信息。
如何使用 python 删除 first 和 last 值=A 0006 005C 0078 0030 0034 0046 0030 00
请您参考如下方法:
您可以使用列表切片:
>>> a = ["one", "two", "three", "four"]
>>> a[1:-1]
['two', 'three']
参见 Good Primer for Python Slice Notation有关此表示法如何工作的更多详细信息。