def rainfall():
print('Hello, and thank you for using the H20 Weather Program.')
years = int(input('How many years of rainfall would you like to track')
months = ["January","February","March"]
print(months)
for x in years:
for y in months:
float(input = ("How much rainfall was there in ",y))
rainfall()
I'm getting a syntax error with the list (see image). I checked the syntax and It's identical to what I have. It works when I define the list outside the function, but It's for a class and the whole program is supposed to be contained in a function.