0

Assignment question: Write a function called list_max that takes a list named a as input and finds and returns its largest element. Don't use the built-in max function.

The function is written like this to start:

def list_max(a):
      # What I have so far is:
      for num in a:
        if num > a:
         return num

But this is returning back to me as incorrect. Is there something I am missing or not doing?

mjsqu
  • 5,151
  • 1
  • 17
  • 21

0 Answers0