3
Hello, please, I would like to copy a certain list in python. The total list size is 150 and I wish to remove the last 50 elements from the list. Here I will represent a list 100 times smaller, ie with 15 elements and I wish to remove the last 5.
l = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]
How could I do that in a gap for? or while?
Thank you very much!
I posted an answer made in a pythonica way, you need it to be inside a loop or have no need ?
– ederwander
(10 times smaller )
– jsbueno