Remove List Items
Remove by value when you know the value, or by position when you know the slot. These operations answer different questions.
Understand the idea
remove deletes the first equal value and raises ValueError if none exists. pop removes and returns an indexed item, with the final item as its default. del deletes a position or slice without producing the removed value. clear empties the existing list.
Where to try it
Open this example with Try in playground. The code loads as editable text and does not run until you select Run. The first run downloads Python. Each run starts fresh; temporary files created by a script are not files on your PC.
A worked example
queue = ["Mira", "Dev", "Mira"]
queue.remove("Mira")
last = queue.pop()
print(queue, last)
Read the result
The remaining list is ['Dev'], and last is Mira. Only the first matching Mira was removed by remove.
Try one change
Try removing a name that is absent, then decide whether absence is a normal outcome or a bug for your task.