A row of bike spots is written as a string: B is a parked bike, . is an empty spot. Write rack_count(rack) to return both how many bikes and how many empty spots: (bikes, empty). An empty string gives (0, 0).
rack_count("BB.B.")→(3, 2)rack_count("")→(0, 0)def rack_count(rack):
bikes = rack.count("B")
empty = rack.count(".")
# your code here: return bikes and empty together
pass
Run tries the examples. When they look right, Submit.