re: Daily Challenge #29 - Xs and Os VIEW POST

TOP OF THREAD FULL DISCUSSION
re: A little Python here. def count_xo(s): count_x, count_o = 0, 0 for c in s: if c.lower() == "x": count_x += 1 if c.lower() == "...
 

Is there a reason why you prefer a for loop over a single call to lower on the str, and then returning lowered.count('x') == lowered.count('o') ?

code of conduct - report abuse