I was writing my own using a for loop, but then the compiler yelled at me for popping entries in the middle of a for loop. So then I thought I would start making a new dictionary with the entries I would remove later once the for loop ran its course. But then I had trouble using the dictionary update() function whilst indexing with the keys.
My code is kinda complicated. So I can give sudo code for what I am trying to do for the latter situation mentioned here.
- Code: Select all
for d in DD:
if "test condition on d is True":
for k in data:
Any suggestions or help is appreciated.