j
k
j a
j l
On 26.03.15 05:36, Ron Adam wrote:
This is probably the fastest way to remove N items from the end. .........L = list("123456789") L ['1', '2', '3', '4', '5', '6', '7', '8', '9'] L[-3:] = [] L ['1', '2', '3', '4', '5', '6']
This is probably the fastest way to remove N items from the end.
......L = list("123456789") L ['1', '2', '3', '4', '5', '6', '7', '8', '9'] L[-3:] = [] L ['1', '2', '3', '4', '5', '6']
...L = list("123456789") L ['1', '2', '3', '4', '5', '6', '7', '8', '9'] L[-3:] = [] L ['1', '2', '3', '4', '5', '6']
L = list("123456789") L ['1', '2', '3', '4', '5', '6', '7', '8', '9'] L[-3:] = [] L ['1', '2', '3', '4', '5', '6']
del L[-3:]
Back to the thread
Back to the list