max() for a dictionary

I’m not a programmer, but does a dictionary in which all its elements have the same key make a lot of sense?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.


Frankly speaking, that is not recommended for the security reasons. In python, if we want a dictionary in which one key has multiple values, then we need to associate an object with each key as value. This value object should be capable of having various values inside it. We can either use a tuple or a list as a value in the dictionary to associate multiple values with a key.

Can you elaborate a bit more on your use case?

Hope this helps!

Cheers, Sri Charan