Leaderboard Lines
Medium · Lists
zip(a, b) walks two lists side by side and gives you pairs. enumerate(items, start=1) adds a counter to each item. Together they replace most index juggling.
Write leaderboard(names, scores) that returns one line per player in the form "<rank>. <name> - <score>". The lists are already in rank order, and ranks start at 1. If one list is longer, stop at the end of the shorter one (that is what zip does).
Next: Split a List into Chunks