Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Getting maximum from iterable
- >>> a = [1, 2, -3]
- >>> max(a)
- 2
- # Getting maximum from iterable
- >>> min(a)
- 1
- # Bot min/max has key value to allow to get maximum by appliing function
- >>> max(a,key=abs)
- 3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement