I suggested it to reduce your conditions, lowering the string before checking would have allowed you to only check for o and x for example. This way you would have one pass on the string and a more concise condition :)
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.
I suggested it to reduce your conditions, lowering the string before checking would have allowed you to only check for
o
andx
for example. This way you would have one pass on the string and a more concise condition :)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 !