bool is not a reserved word in Python (those are keywords like in, for, while), but it is the name of a built-in function. But, like any name in Python, it can be overwritten, which happens in this case.
But the OP is correct in stating that it is terrible practice and shouldn't be done.
This comment is hidden because it contains spoiler information about the solution
One's life is full of idiots.
Why does this solution have a lot of "Best Practices" upvotes if this is a bad practice?
bool
is not a reserved word in Python (those are keywords likein
,for
,while
), but it is the name of a built-in function. But, like any name in Python, it can be overwritten, which happens in this case.But the OP is correct in stating that it is terrible practice and shouldn't be done.
I tested it and the "bool" word can be used in a function and also out of a function
thats what all of this code is doing. thats the whole point of this kata