# breaking it down medium

The Cinema Row Report

The usher radios the booth: how many free seats total, and which row has the most? 🎬

You get the rows β€” each a string of x (taken) and . (free). Print free <total free seats> then best <row number> (rows count from 1; first on ties).

Example:

Input: rows = ["x.x.", "....", "xxx."] Output:

free 7
best 2

Row 1 has 2 free seats, row 2 has 4, row 3 has 1 β€” 2 + 4 + 1 = 7 free total, and row 2 has the most.

πŸ’‘ need a hint?

brk-cinema-rows.pyπŸ”’ given lines are locked β€” write your code in between
loading...