Skip to content

Instantly share code, notes, and snippets.

@d5h
Created November 9, 2016 22:28
Show Gist options
  • Save d5h/f8b536f41182d87cdaebaa9940173434 to your computer and use it in GitHub Desktop.
Save d5h/f8b536f41182d87cdaebaa9940173434 to your computer and use it in GitHub Desktop.
def generate_trips(route_names, start_hour, end_hour):
results = []
for route_name in route_names:
for hour in range(start_hour, end_hour):
results.append((route_name, hour))
return results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment