D
D
David Armyan2020-09-11 21:28:01
Python
David Armyan, 2020-09-11 21:28:01

How to slice the last 40 elements of a Python list?

Let's say the string a = [1,2,3 ... 84] or any other length.
How to cut a list so that it cuts off the last 40 elements?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
kirillinyakin, 2020-09-11
@proboltal

b[-40:]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question