I have a list, and need to create a count of how many times a condition is met. Is it more pythonic to do this:
cnt = sum([1 for s in a_list if some_condition])
or is this more pythonic:
cnt = 0
for s in a_list:
if (some_condition):
cnt += 1