I created a dictionary with key with multiple values. How can I access those values from single key?
d = {'a':(1,2,3),('b','c'):5}
I want to access the values 1,2 or 3 using the key 'a'.
I created a dictionary with key with multiple values. How can I access those values from single key?
d = {'a':(1,2,3),('b','c'):5}
I want to access the values 1,2 or 3 using the key 'a'.
d['a']
is a tuple, and like any tuple you can access it's elements as such: d['a'][0]
which holds the value 1