Python Forum
Checking if the combination of two keys is in a dictionary?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Checking if the combination of two keys is in a dictionary?
#3
(Dec-03-2019, 10:28 PM)stullis Wrote: The current implementation does not work because keys in a dict cannot be looked up like that. You could use the namedTuple in the Collections module or try a Numpy Dataframe. If you go down the namedTuple route, it could benefit you to inherit it and write a method to do the search.
How would the named tuple approach work?
Reply


Messages In This Thread
RE: Checking if the combination of two keys is in a dictionary? - by mrsenorchuck - Dec-03-2019, 10:32 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Group List Elements according to the Input with the order of binary combination quest_ 19 6,433 Jan-28-2021, 03:36 AM
Last Post: bowlofred
  Iterating over a dictionary in a for loop - checking code has worked sallyjc81 1 1,922 Dec-29-2020, 05:14 PM
Last Post: ndc85430
  Adding keys and values to a dictionary giladal 3 2,477 Nov-19-2020, 04:58 PM
Last Post: deanhystad
  Error while checking for key in Dictionary onenessboy 5 2,667 Aug-14-2020, 01:06 PM
Last Post: onenessboy
  access dictionary with keys from another and write values to list redminote4dd 6 3,238 Jun-03-2020, 05:20 PM
Last Post: DeaD_EyE
  Drop Keys From Dictionary donnertrud 8 3,689 May-30-2020, 11:39 AM
Last Post: DeaD_EyE
  Problem adding keys/values to dictionary where keynames = "property" and "value" jasonashaw 1 2,039 Dec-17-2019, 08:00 PM
Last Post: jasonashaw
  Retrieving dictionary keys within with another dictionay bazcurtis 8 2,817 Oct-29-2019, 10:06 PM
Last Post: bazcurtis
  how to get all the possible permutation and combination of a sentence in python sodmzs 1 4,161 Jun-13-2019, 07:02 AM
Last Post: perfringo
  json.dumps to keep dictionary keys batchenr 1 2,009 May-14-2019, 11:17 AM
Last Post: buran

Forum Jump:

User Panel Messages

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