Print index of Max Number in a List


I am trying to print the index position of the highest number in a list.

Here is the code I have so far:

aList = [2,1,5,234,3,44,7,6,4,5,9,11,12,14,13]

max = 0

for i in (aList):    
    if I  >  max:
        i  =  max + i

I do not want to print the highest number but the index of that number. Thank you.


Are these homework assignments? What are these tasks? Given they are not codecademy exercise related it seemed, just to ensure that helping is okay


I do not need the answer just maybe pointed in the right direction. Or if there is a lesson on here be pointed to that. Thank you.


that is usually how i help, but i would like an answer to my question please. Are these home work assignments?


Have you thought about what prevents you from doing that? What are you missing and how can you obtain that?
If you can manually figure out what that index is, then what’s stopping you from describing that exact same procedure in the code?

What I generally want to see in a question is something that convinces me that you can’t do it yourself and enough to tell me what exact information you need.
What I never want to see is “how do I fix this” or “what is wrong”


Sorry, yes it is part of an assignment.


See @ionatan reply, he makes some very good points


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.