Pythondex

Exercise

List Operations Exercise

In this exercise, you'll practice using append(), remove(), and len() with a list.

Task

Write a Python program that:

  • Creates a list of fruits with at least three items
  • Adds a new fruit to the list using append()
  • Removes one fruit using remove()
  • Prints the final list and the total number of fruits using len()

Example Output

Solve