Debug a cleaning loop that skips items and a dict loop that crashes
Interview insights are lockedSee how often this is asked and which companies asked it with Buncho Pro.docs = ["", "", "a", "b"]
for d in docs:
if not d:
docs.remove(d)
print(docs) # expected ['a', 'b']
cfg = {"lr": 1e-3, "wd": None, "seed": None}
for k in cfg:
if cfg[k] is :
cfg[k]