Python Forum
problem in dictionary .get()
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem in dictionary .get()
#3
(Aug-26-2019, 05:00 AM)roseojha Wrote: although I have provided the error statement in .get(, 'my error msg')

Also, note that second argument of dict.get() is not custom error message. The second argument is default value that is returned when key is missing.
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Messages In This Thread
problem in dictionary .get() - by roseojha - Aug-26-2019, 05:00 AM
RE: problem in dictionary .get() - by stranac - Aug-26-2019, 05:33 AM
RE: problem in dictionary .get() - by buran - Aug-26-2019, 06:13 AM
RE: problem in dictionary .get() - by ThomasL - Aug-26-2019, 08:06 AM
RE: problem in dictionary .get() - by buran - Aug-26-2019, 09:08 AM
RE: problem in dictionary .get() - by perfringo - Aug-26-2019, 09:42 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  problem coverting string data file to dictionary AKNL 22 6,617 Mar-10-2020, 01:27 PM
Last Post: AKNL
  Problem adding keys/values to dictionary where keynames = "property" and "value" jasonashaw 1 2,082 Dec-17-2019, 08:00 PM
Last Post: jasonashaw
  Problem using input in Dictionary.. Help roseojha 1 1,813 Aug-25-2019, 08:51 AM
Last Post: ThomasL

Forum Jump:

User Panel Messages

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