← back to unit
Easy
# searching easy
Find the Seat Number
The movie tickets got mixed up! 🎬 Each friend's name is written on a seat, in order.
You get a list of names and a target friend who is definitely somewhere in the list. Print the seat number where they belong — seats are counted from 0.
Example:
Input: names = ["ruby", "sam", "tess", "omar"], target = "tess"
Output: 2
tess is the third name, and since we count seats from 0, that's index 2.
💡 need a hint?
srch-seat-number.py🔒 given lines are locked — write your code in between
loading...