Update the Timetable
Python
15 pts
Update the Timetable
Change the list timetable with three lines of code, in this order:
- Change
"Science"(index 2) to"Biology". - Insert
"Art"at index 1. - Change the last item to
"Geography"using a negative index.
Then print the list. Expected output:
['Maths', 'Art', 'English', 'Biology', 'Geography']
Checklist
- Keep the list
timetableand make sure it ends up with 5 items. - Replace
"Science"(index 2) with"Biology". - Insert
"Art"at index 1. - Change the last item to
"Geography"with a negative index. - Print
timetable.
🔑 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.
