remove, pop and del on a list
Predict the outputMediumPython only
a = [10, 20, 30, 20]
a.remove(20)
print(a)
print(a.pop())
print(a.pop(0))
print(a)
del a[0]
print(a)
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.