I have a list of sport game names and need to take out year from it. Say, we have game name 'NHL 2008' in the list, and I need to take 2007 as a game release year out of the phrase. Trying to do this:

```
years = list(range(1900,2017))
print(years)
def correct_year(game_name):
    correct_year=0
    for year in years:
        if year in game_name:
            correct_year=year-1
    return correct_year

print(correct_year('NHL 2008'))

```

```
TypeError: 'in <string>' requires string as left operand, not int

```

How can I check it correctly and get the 'year-1' value?