what this command is used for max_index | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

what this command is used for max_index

idk when I have to do this and why, could someone explain what it does?

7th Oct 2018, 11:16 AM
Hugo Parada
Hugo Parada - avatar
3 Answers
+ 1
Hugo Parada there is no such command or function called max_index in Python. Maybe that is the name of a variable you saw in someone's code.
7th Oct 2018, 11:40 AM
Ulisses Cruz
Ulisses Cruz - avatar
+ 1
There is no command called "max_index". If you need to get array max index you can write: arr[-1] Please send your code to be more specific.
7th Oct 2018, 11:41 AM
Potato Squad
Potato Squad - avatar
0
I never heard of that function neither, I can only guess that it is a (custom-made, not pre-defined) function to return the index of the maximum value of a list: https://code.sololearn.com/cauerDCYRTKK/?ref=app
7th Oct 2018, 11:52 AM
Anna
Anna - avatar