-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path"max...min" function
More file actions
25 lines (15 loc) · 829 Bytes
/
"max...min" function
File metadata and controls
25 lines (15 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
list1 = [7, 10, 210, 30, 440, 5000000000, 960, 780, 80, 90, 10000, 501321] # This is the list
max_list = max(list1) # max function indicate biggest number in the list
print("this is my list:", list1)
print("this is max list : ", max_list)
Result:
this is my list: [7, 10, 210, 30, 440, 5000000000, 960, 780, 80, 90, 10000, 501321]
this is max list : 5000000000
**********************************************************************************************
list1 = [7, 10, 210, 30, 440, 5000000000, 960, 780, 80, 90, 10000, 501321] # This is the list
min_list = min(list1) # min function indicate the smallest number in the list
print("this is my list:", list1)
print("this is min list : ", min_list)
Result:
this is my list: [7, 10, 210, 30, 440, 5000000000, 960, 780, 80, 90, 10000, 501321]
this is min list : 7