python - Remove dictionary from list - Stack Overflow

PHOTO EMBED

Thu Nov 10 2022 13:14:57 GMT+0000 (Coordinated Universal Time)

Saved by @jacopo #python

for i in range(len(dicts)):
    if dicts[i].get('id') == 2:
        del dicts[i]
content_copyCOPY

https://stackoverflow.com/questions/1235618/remove-dictionary-from-list