Skip to content
Code ReadingAll Positive?
Break the Code

All Positive?

Write a list for which this function gives the wrong answer.
1def all_positive(values):
2 if len(values) == 0:
3 return False
4 for v in values:
5 if v <= 0:
6 return False
7 return True