A row of bus seats: True is taken, False is free. Write first_free_seat(seats) to return the number of the first free seat, counting from 1. If every seat is taken, return None.
first_free_seat([True, True, False, False])→3first_free_seat([True, True])→Nonedef first_free_seat(seats):
for i in range(len(seats)):
# your code here: a free seat? return its number i + 1
pass
return 0
Run tries the examples. When they look right, Submit.