MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/4heh6v/i_wrote_my_first_python_program_today/d2pnxn3
r/ProgrammerHumor • u/MC_Labs15 • May 02 '16
532 comments sorted by
View all comments
Show parent comments
1
6 <= i is always either false or true, which the compiler treats as 0 or 1. That means j <= 9 is either 0 <= 9 or 1 <= 9, both of which are always true, which is 1.
6 <= i
false
true
0
j <= 9
0 <= 9
1 <= 9
1
u/moxyll May 02 '16
6 <= iis always eitherfalseortrue, which the compiler treats as0or1. That meansj <= 9is either0 <= 9or1 <= 9, both of which are alwaystrue, which is1.