Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
title author date
any(), all(), max(), min(), sum()
Damian
05/04/2018

Generate Data

data = [340, 564, 250, 120, 230]

any()

# Return true if any element is True
any(data)
True

all()

# Return true if all elements are True
all(data)
True

max()

# Return max value
max(data)
564

min()

# Return the min value
min(data)
120

sum()

# Return the total value
sum(data)
1504
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.