Mastery check
Combination Rep~4 min

Write: who sits where

seats is a dict mapping guest names (strings) to seat numbers (ints). No two guests share a seat.

Write by_seat(seats) that returns a new dict going the other way: seat number → guest name.

by_seat({'ana': 3, 'ben': 7}) → {3: 'ana', 7: 'ben'}

No labels here: choosing the approach is part of what this tests. The skills it trains show once you pass.

main.pypracticePython