Мой профиль
ACTIVITY 28 / 50

Add a discovery

Try as many times as you need

Let’s understand

A method follows an object and a dot. append adds an item at the end. remove deletes the first matching value. These methods change the list itself, so do not assign the result of append back to it.

Listen to the explanation

Example

items = ["a"]
items.append("b")
print(items)
YOUR MISSION

Append water to samples, then print the list.

I need a hint

samples.append("water") changes the existing list.

How to find an error
  1. Read the last line of the error message.
  2. Find the indicated line. Check quotes, parentheses and indentation.
  3. Change one thing and run again.

main.py

4 spaces

Your draft stays in this browser.

Result

Python
Your program’s output will appear here. Click Run.