Spot the bug in archived-record removal

from Control flow
Python 3.14 beginner 4 min 1 issue to find

Find the bug in this function that should remove every archived record.

Python
def remove_archived(records):
    for record in records:
        if record["archived"]:
            records.remove(record)
    return records
Open in playground
Report an error