Avatar ·

How to get all the keys with the same values?

📁 словарь, python

There is such a dictionary: mydict = {'Main': 'Open', 'Second': 'Close', 'Third': 'Open'} . It is necessary to get all the keys to the values ​​of 'open'

. Class = ""> 'Main' : 'open' , 'second' : 'clause' , 'Third' : 'open' } print ( list (mydict.keys ()) [ List (mydict.values ​​()). Index ( 'open' )])

it displays only main . How to display all the keys with the meaning of 'Open' ?