I am a coding newbie and I'm having a trouble writing this code:
my_data ={
'a' : (900, (1, 2, 3, 11, 12))
'b' : (200, (1,2,3))
}
while True:
month = int(input("which month?"))
for key in my_data.keys():
if month in my_data.keys()[1] :
print ('')
Obviously this code won't work but I have no idea how to go further with it.
What I want the program to ultimately print is..:
>>>which month?3
>>>'a', 'b'
So... basically I don't know how to match/search the input data(month) in a tuple in a tuple in a value in a dictionary (whoa does this make sense??)
I'm very doubtful of my code, please tell me if this is not the recommended way.
Thank you