v any(), all(), max(), min(), sum() - Python

any(), all(), max(), min(), sum()

Interesting in learning more? Check out Fluent Python

Create Data

data = [34, 54, 50, 20, 20]

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)
54

min()

# Return the min value
min(data)
20

sum()

# Return the total value
sum(data)
178