step 20 - instructs to check: if len(calendar.keys()) < 1 - to determine if calendar is not empty.
step 38 - instructs to iterate through calendar.keys() - for next steps looking for a value match.
These lines execute the same by my testing when calendar.keys() is replaced with just calendar.
i.e. if len(calendar) < 1: or for date in calendar:
Why do we chose to reference calendar.keys() instead of just calendar? Are these equivalent in this situation; or is referencing .keys() better somehow?
tags: Lists, keys,