I have a list of booleans I'd like to logically combine using and/or. The expanded operations would be:
vals = [True, False, True, True, True, False]
# And-ing them together
result = True
for item in vals:
result = result and item
# Or-ing them together
result = False
for item in vals:
result = result or item
Are there nifty one-liners for each of the above?