Answers for "python max number in list"

6

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
Posted by: Guest on August-01-2021
2

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)
Posted by: Guest on June-25-2021
5

max int in a python list

>>> L=[2,-7,3,3,6,2,5]
>>> max(L)
6
Posted by: Guest on May-15-2020
0

finding the maximum value in a list python

arr = [0, 1, 2, 3]
maximum_value = max(arr)
print(maximum_value) #should print 3
Posted by: Guest on August-09-2021
1

find location of max value in python list

>>> m = max(a)
>>> [i for i, j in enumerate(a) if j == m]
[9, 12]
Posted by: Guest on October-14-2020

Code answers related to "python max number in list"

Python Answers by Framework

Browse Popular Code Answers by Language