Race Results
Python
25 pts
Race Results
The finishing order of a race in Asmara is stored in race.
- In one line, unpack
raceintofirst,*middleandlast. - Print
first, thenlast, thenmiddle. - Two variables
x = 10andy = 20are given. Swap them in one line, then printx, y.
Expected output:
Selam Yonas ['Abel', 'Merhawi', 'Ruta'] 20 10
Checklist
- Keep
raceunchanged and unpack it intofirst,*middleandlastin one line. - Swap
xandyin one line. - Print
first,lastandmiddle, thenxandyon one line.
🔑 Solution
If you view the solution before passing, you earn half points for this exercise. You still need to type it and press Check to finish.
How it works, step by step
Point at a step to highlight its lines. Type the solution yourself and press Check answer to finish.
