sample list [1, 0, 0, 1, 0, 0, 1, 0, 0, 0]
1 means occupied and 0 means unoccupied
expected output: occupied [0,3,6] unoccupied: [1,2,3,4,5,6,7,9]
def row_seats(seats):
occupied_seats =[]
vacant_seats =[]
for x in seats:
if x == 0:
vacant_seat.index(x)
elif x == 1 :
occupied_seats.index(x)
this is what i have done so far but i do not think i am approaching it properly any help would be appreciated!