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))
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))
how to find highest number in list without using max function python
Numbers = [90,78,34,50,100,99]
higest_number = 0
for number in Numbers:
if number > higest_number:
higest_number = number
min and max number in list python
def Max_min(list_of_number):
largest_number = 0
smallest_number = 0
for num in list_of_number:
if num > largest_number:
largest_number = num
elif num < smallest_number:
smallest_number = num
return "Largest number ="+ str(largest_number) + "Smallest Number="+str(smallest_number)
python index max list
number_list = [1, 2, 3]
max_value = max(number_list)
# Return the max value of the list
max_index = number_list.index(max_value)
# Find the index of the max value
print(max_index)
max in a list python
li=[0,70,7,89]
max(li)
#gives the max value 89
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us