Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
KeyError: '1'
#2
In line 6, mydict is empty, as defined on line 2. So anything you try to pull out of there is going to give you a key error. You need to assign something to mydict['1'] before you can access anything from it.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply


Messages In This Thread
KeyError: '1' - by mikerosz94 - Aug-31-2017, 01:43 PM
RE: KeyError: '1' - by ichabod801 - Aug-31-2017, 03:08 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020