How To Get Min And Max Number From Array In Python: A Guide To Array Functions
Hello Friends,
Today I started working on python, So I decided to create a small tutorial about python. Today, I will show you how to get min and max numbers from the list of numbers. Python lists are a type of array. I will show you an example of finding min and max numbers from the list of numbers. I am writing this example in python3.
Let's Start.
list.py
list = [10, 5, 70, 200, 70]
# Python min and max Numbers in a List Example
min = min(list)
max = max(list)
print(min)
print(max)
Output
5
200
I hope this is helpful to you.
Thanks
881