On Tue, 10 Mar 2015 21:04:16 -0400, jep200404 at columbus.rr.com wrote: > Better yet, change the try/except stuff to: > > if hour not in hoursdict: > hoursdict[hour] = {} > hourdict = hoursdict[hour] Better yet: hourdict = hoursdict.setdefault(hour, {})