all
PY-W0075all
32 """
33 Checks config of SMTP
34 """
35 for field in config: 36 if field is None:
37 return False
38 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)