loops - "for i in True,False:" Python, explanation needed -


I hope I can not find a solution to the problem just for clarification here.

So I know how it works:

 for  category (10): // block of code  

It's all the way through i = 0, I = 9, so this code executes 10 times my question is what does this do:

  For the truth, the wrong : // Block code  

Is this running only once? Or twice? Or what block of code do I use as correct / incorrect or 1/0?

I can clarify this for someone to me!

true, wrong is a tube, which is equal to (True, False) . This is the length of the tubal, so the code block runs twice.

For this, it runs as a boolean or integer, depending on how you use i bool Python If there is a subclass of int , it will normally act as a boolean, but you will be able to do mathematical operations with it because it is basically just a representation of an integer.


Comments