Grow the Class List
Python
15 pts
Grow the Class List
Change the list students in this order:
- Add
"Hana"to the end withappend(). - Insert
"Merhawi"at the beginning withinsert(). - Add the two new students
["Yonas", "Ruth"]withextend().
Then print the list and its length. Expected output:
['Merhawi', 'Selam', 'Abel', 'Hana', 'Yonas', 'Ruth'] 6
Checklist
- Add
"Hana"to the end ofstudentswithappend()(change the list, do not assign the result). - Insert
"Merhawi"at the beginning withinsert(). - Add
"Yonas"and"Ruth"as two separate items withextend(). - Print the list and then its length.
🔑 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.
