Loading…
Access a non-existent dictionary key in {'x': 1} using try-except. If a KeyError occurs, print 'Key not found.'.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.