Answers for "min max list python"

2

python maths max value capped at x

def clamp(n, minn, maxn):
    return max(min(maxn, n), minn)
Posted by: Guest on April-10-2020
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 make a python script write the minimum and maximum value

how to make a python script write the minimum add maximum value
Posted by: Guest on November-04-2020
0

python list max value

#!/usr/bin/python

list1, list2 = [123, 'xyz', 'zara', 'abc'], [456, 700, 200]
print "Max value element : ", max(list1)
print "Max value element : ", max(list2)
Posted by: Guest on August-29-2020

Python Answers by Framework

Browse Popular Code Answers by Language