I am a beginner of Python. I try to use this method:
random.choice(my_dict.keys())
but there is an error:
'dict_keys' object does not support indexing
my dictionary is very simple, like
my_dict = {('cloudy', 1 ): 10, ('windy', 1): 20}
Do you how to solve this problem? Thanks a lot!