Question: Write a function pop _ two _ elements ( ) that removes the last two elements of a list parameter. Click here for example Ex:

Write a function pop_two_elements() that removes the last two elements of a list parameter.
Click here for example
Ex: If the input is:
London Bridge is falling down, my fair lady
then the output is:
['London', 'Bridge', 'is', 'falling', 'down,','my']
Below is part of the code:
''' Your code goes here '''
num_list = input().split(\)
pop_two_elements(num_list)
print(num_list)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!