-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFunctions_min().py
More file actions
45 lines (27 loc) · 865 Bytes
/
Functions_min().py
File metadata and controls
45 lines (27 loc) · 865 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Python min() Function
# Example
# Return the lowest number:
x = min(5, 10)
# Definition and Usage
# The min() function returns the item with the lowest value, or the item with the lowest value in an iterable.
# If the values are strings, an alphabetically comparison is done.
# Syntax
# min(n1, n2, n3, ...)
# Or:
# min(iterable)
# Parameter Values
# Parameter Description
# n1, n2, n3, ... One or more items to compare
# Or:
# Parameter Description
# iterable An iterable, with one or more items to compare
# More Examples
# Example
# Return the name with the lowest value, ordered alphabetically:
x = min("Mike", "John", "Vicky")
# Example
# Return the item in a tuple with the lowest value:
a = (1, 5, 3, 9)
x = min(a)
# Related Pages
# The max() function, to return the highest value.