Answers for "find min max value of a given list python"

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
0

how to get minimum value in list python

>>> nums = [2, 1, 4, 5, 3]
>>> min(nums)
1
Posted by: Guest on September-10-2021

Code answers related to "find min max value of a given list python"

Python Answers by Framework

Browse Popular Code Answers by Language