Hello, please, I would like to copy a certain list in python. The total size of the list is 150 and I want to remove the last 50 items from the list. Here I will represent a list 100 times smaller, that is to say with 15 elements and that I want 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 this in a loop? or while?
Thank you!