Answer:
See explanation
Step-by-step explanation:
Given
Solving (a):
print(ex[0:2])
This prints the elements from 0 index to 2-1
In other words, it prints index 0 and 1
Hence, the output is [5, 3]
Solving (b):
ex.append(8) --> This adds 8 to the end of the list
print(ex) --> This prints the updated list: [5, 3, 0, 1, 2, 8]
Solving (c):
ex.remove(0) --> This removes 0 from the list
print(ex) --> This prints the updated list: [5, 3, 1, 2, 8]
Solving (d):
ex.pop() --> This removes the last ite, from the list
print(ex) --> This prints the updated list: [5, 3, 1, 2]