Lists - Strings
Objective
After working through this lesson, you’ll be able to
Write Python code using lists.
Video Lecture
Introductory Problem
Create a list of 3 of your friends. Print the list using a for loop.
Examples
Example 1
You make a new friend named “Chaya” on the bus ride. Add this friend to the end of the list. Print the list using a for loop.
Example 2
One of your friends moves away. Ask the user for the friend's name. Delete this friend. Print the list using a for loop.
Example 3
You make new friends riding the bus. Ask the user for a new friend 3 times. Using a for loop, print the list of friends. Print the total number of friends.
Last updated
Was this helpful?