Do you mean lowering the string before the loop or lowering the character in the loop before checking whether it is an 'x' or 'o'?
Lowering the string before the loop would involve one complete pass of the string. And then you would have to iterate through the string, again, to count the frequencies.
Lowering just the character inside the loop, is just equivalent to the if condition, right? I am probably saving on a function call by not calling .lower() on the character.
Do you mean lowering the string before the loop or lowering the character in the loop before checking whether it is an 'x' or 'o'?
.lower()
on the character.Oh right, nevermind !