I have a dict in the form
{'Friday': {'US Eastern (EST)': 'Feb-19', '1:00: AM': '100 reasons why God hates porn. 1/100: Love of God (Bible) /Jay', '7:00: PM': 'Do Not Be Conformed To This World The Whys and the Whats Bible Study w/Esc', '8:00: PM': 'Game Night w/ Sam Stardew Valley'}, 'Monday': {'US Eastern (EST)': 'Feb-15', '7:30: PM': 'Prayer Meeting', '8:00: PM': 'Board Game Night w/Esc Tabletop Simulator'}, 'Saturday': {'US Eastern (EST)': 'Feb-20', '8:00: AM': 'Bible study on Hope w/Joel', '8:30: PM': 'Ladies Hangout'}, 'Tuesday': {'US Eastern (EST)': 'Feb-16', '12:30: AM': 'Starting/Ending the day (part with 3)- What Psalm 16 can we learn about prayer from David? (Combinated) /Jay', '8:00: PM': 'Ask Anything w/ Pace RE: Ravi Zacharias Recent Findings', '9:00: PM': 'Game Night w/ Sir Labalot Rocket League + Among Us'}, 'Wednesday': {'US Eastern (EST)': 'Feb-17', '9:00: PM': 'Bible Before Bed w/ Sir Labalot (~45 Mins)'}}
Basically, all the days together with their times and events. I'm trying to replace the times with DateTime strings. (2021-02-16 00:30:00+00:00)
So far, this is the code I've written but I'm getting a run time error (RuntimeError: dictionary changed size during iteration) and thus would like some help optimizing the code and seeing exactly what I'm doing wrong to cause the error.
from t import dictionary
from workingdicts import times
new = dictionary.copy()
x = times.splitlines()
#times has the DateTime strings and dictionary is the dict
for line in times.splitlines():
for key in dictionary.copy():
for day in new[key]:
if 'EST' in day:
continue
else:
new[key][line] = new[key].pop(day)