How python deletes the following numbers

clipboard.png
I now want to delete the last five digits, 14 15 16 17 19

Mar.21,2021

@ Cucumber has the right answer.

use del l [- 5:] .

l = [1,2,3,4,5,6,7,8,9,0]
del l[-5:]
Menu