I looked through the database of answers pertaining to this topic and couldn't find an answer, essentially I'm looping through a dictionary, I'm getting the, "dictionary changes size," runtime error yet I'm popping out one key and value and inserting another before the iteration resumes.
for patterns in dict_copy.keys():
new_tuple = ()
for items in range(len(patterns)):
if patters[items] not in exclusion:
new_tuple += (patterns[items],)
dict_copy[new_tuple] = dict_copy.get(patterns)
dict_copy.pop(patterns)
The dictionaries I'm working with are in the form: {("A","B","C","D"):4, ("B","A","C","D") "2...} I'm pretty much just confused over the fact that it thinks I'm chaning the dictionary size