The Biggest Reading

Python for AIMedium+10 XP+10

The Biggest Reading

Sensors report their readings in rows, one row per sensor. Some sensors sent nothing, so their row is empty.

Write largest_reading(readings) that returns the biggest number anywhere in the list of lists.

  • There is at least one number somewhere.
  • Readings can be negative.

Examples

readings = [[3, 8], [], [5]]
returns 8
readings = [[12, 4, 9], [15, 3], [7]]
returns 15
readings = [[], [-4, -2], []]
returns -2

Hints

Solve it to unlock the solution

Once your code passes every test, a reference solution shows up here so you can compare it with yours.

solution.py
CtrlEnterto run