Python Slicing

I am just wondering as to what slicing in python is becasue in the lesson Delete Starting Even Numbers, got stuck and it gave me a while loop:

while (len(lst) > 0 and lst[0] % 2 == 0):
    lst = lst[1:]
  return lst

I don’t understand the lst = lst[1:], please help :smiley:

You select a portion of the list, in this case from the second element (1st index) till end. An expensive way of removing the first element (0th index) of the list


If you wanted some more reading, this article explains it nicely.