Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Some help with Dictionaries
#1
Script,
a_dic = {
    "a" :   [":D", ":)"],
    "b" :   ["lol", "XD"],
    "c" :   ["lol", ">:"],
    "d" :   [":)", "XD"]
}
How do I search for values and print out their key?

In a_dict i want to search ":)" and print its keys.

For example :
Search_item = ":)"
Output:
d a
Reply


Messages In This Thread
Some help with Dictionaries - by Oshadha - Jan-19-2021, 06:23 AM
RE: Some help with Dictionaries - by bowlofred - Jan-19-2021, 06:46 AM
RE: Some help with Dictionaries - by Oshadha - Jan-19-2021, 06:57 AM
RE: Some help with Dictionaries - by DeaD_EyE - Jan-19-2021, 08:48 AM

Forum Jump:

User Panel Messages

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