all
PY-W0075all
97
98
99def _empty_row(row):
100 for column_value in row:101 if column_value != ROW_SEPARATOR and column_value.strip():
102 return False
103 return True
It is recommended to use all
for this loop, as it will make your code smaller and more readable.
def all_even(items):
for item in items:
if item % 2 != 0:
return False
return True
def all_even(items):
return all(item % 2 == 0 for item in items)