Skip to content

Instantly share code, notes, and snippets.

@ben-n93
Created January 31, 2023 10:33
Show Gist options
  • Save ben-n93/3d0266580a9c3da27206f166effaf5a5 to your computer and use it in GitHub Desktop.
Save ben-n93/3d0266580a9c3da27206f166effaf5a5 to your computer and use it in GitHub Desktop.
# Check to see which horror films are set in which US states.
horror_films_with_states = []
for film in states_films:
if film in horror_films and film.year_released is None:
film.year_released = horror_films[horror_films.index(film)].year_released
horror_films_with_states.append(film)
elif film in horror_films and film.year_released is not None:
horror_films_with_states.append(film)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment