Lab: Lists#

This lab will give you practice to help solidify your understanding of lists and loops.

Part 1: Build Your own To-Do List#

Make sure you understand the syntax introduced in the lists lecture.

1. Create a List#

Create a list variable called todo_list with the following items:

  1. Wake up early

  2. Exercise

  3. Eat Breakfast

  4. Do Python Lab

  5. Watch Class

2. Change an Item#

Change “Wake up early” to “Wake up on time”

3. Access an Item#

Print the third item in todo_list

4. Access an Index#

Print index three of todo_list

5. Use append#

Use the append function to add “Sleep” to the end of todo_list

6. Use insert#

Use insert to insert “Read the Book” between “Do Python Lab” and “Watch Class”

7. Use del#

Use the del operator to remove “Wake up on time”

8. Use remove#

Use the remove function to remove “Sleep” from the todo_list