Because that isn't valid syntax at all. In any case, there is no reason to do what you are doing, your for-loop is fine, aside from the fact that you are iterating over a
range
for no good reason, instead, iterate over your list directly:
for c in list_of_letters: if 96 < c[0]) < 123: num_of_abc +=1
, of course, with indentation. Stop trying to cram everything into a one-liner. That is
bad. That's the sort of thing that will get you eviscerated in any competant code review, or for that matter, would be a huge red-flag in any sort of code sample for a job application —
juanpa.arrivillaga 23 secs ago