Answers for "Given a list of numbers. Determine the element in the list with the largest value. Print the value of the largest element and then the index number. If the highest element is not unique, print the index of the first instance."

11

python find index of highest value in list

numbers = [5, 4, 7, 3, 9, 1, 2]
biggest_number = max(numbers)
print(numbers.index(biggest_number))
Posted by: Guest on October-05-2020
0

find the largest and smallest numbers in a list

thislist = [677,8765,8765,876,470,754,6784,56789,7658,]
thislist.sort()
print ("The smallest number is: " + str(thislist[0]))
print ("The largest number is: " + str(thislist[-1]))
Posted by: Guest on June-03-2021

Code answers related to "Given a list of numbers. Determine the element in the list with the largest value. Print the value of the largest element and then the index number. If the highest element is not unique, print the index of the first instance."

Python Answers by Framework

Browse Popular Code Answers by Language