About 9,390,000 results
Open links in new tab
  1. python - Get key by value in dictionary - Stack Overflow

    Here, recover_key takes dictionary and value to find in dictionary. We then loop over the keys in dictionary and make a comparison with that of value and return that particular key.

  2. Search a list of dictionaries in Python - Stack Overflow

    Conclusion: Clearly having a dictionary of dicts is the most efficient way to be able to search in those cases, where you know say you will be searching by id's only. interestingly using filter is …

  3. How to Find Item in Dictionary Collection? - Stack Overflow

    protected static Dictionary<string, string> _tags; Now I want to look locate a particular entry in the collection. I tried the following.

  4. python - How to search through dictionaries? - Stack Overflow

    Jan 30, 2015 · How to search through dictionaries? Asked 10 years, 9 months ago Modified 3 years, 8 months ago Viewed 229k times

  5. c# - Get dictionary key by value - Stack Overflow

    Values.ToList () converts your dictionary values into a List of objects. IndexOf ("one") searches your new List looking for "one" and returns the Index which would match the index of the …

  6. python - Efficient Dictionary Searching? - Stack Overflow

    The longer your list, the longer it takes to search for a given key. Contrast this to data_dict[keyStr]. This performs a hash lookup, which is an O (1) operation. It doesn't (directly) depend on the …

  7. Case insensitive access for generic dictionary - Stack Overflow

    Nov 5, 2012 · I have an application that use managed dlls. One of those dlls return a generic dictionary: Dictionary&lt;string, int&gt; MyDictionary; The dictionary contains keys with upper …

  8. How to lookup / check a dictionary value by key - Stack Overflow

    Jul 29, 2012 · I am trying to confirm whether a specific dictionary key contains a value e.g. does dict01 contain the phrase "testing" in the "tester" key At the moment I am having to iterate …

  9. c# - Why is accessing an element of a dictionary by key O (1) even ...

    May 20, 2016 · If a dictionary/map is implemented as a HashMap, it has a best case complexity of O(1), since i best case it requires exactly the calculation of the hash-code of the key element …

  10. Retrieving Dictionary Value Best Practices - Stack Overflow

    When you call the Contains method, Dictionary does an internal search to find its index. If it returns true, you need another index search to get the actual value. When you use …