SHARE
TWEET

Untitled

a guest Jul 17th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # Getting maximum from iterable
  2. >>> a = [1, 2, -3]
  3. >>> max(a)
  4. 2
  5.  
  6. # Getting maximum from iterable
  7. >>> min(a)
  8. 1
  9.  
  10. # Bot min/max has key value to allow to get maximum by appliing function
  11. >>> max(a,key=abs)
  12. 3
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top