×

python · level 1 · unit 6 · lesson 4

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

Lists can tell you the biggest and the smallest.

Lists can answer questions. finds the biggest value and finds the smallest. Give them a list of temperatures and they find the hottest and the coldest day for you.

in asks "is this in the list?" and gives back True or False. .count() tells you how many times a value turns up.

You can also search by hand with a loop and an if, checking each item in turn. max() and min() do that work for you.

temps = [14, 19, 11, 17]
print(max(temps), min(temps))
print(19 in temps)
print(temps.count(17))

max() and min() give back the value itself, not its index.