Skip to main content
Mod Removes Wiki by Doorknob
added 4 characters in body
Source Link
Mechanical snail
  • 2.3k
  • 1
  • 18
  • 21

When you have two boolean values, a and b, if you want to find out if both a and b are true, use * instead of and:

if a and b: #7 chars 

vs

if a*b: #3 chars 

if either value is false, it will evaluate as 0 in that statement, and an integer value is only true if it is 1nonzero.

When you have two boolean values, a and b, if you want to find out if both a and b are true, use * instead of and:

if a and b: #7 chars 

vs

if a*b: #3 chars 

if either value is false, it will evaluate as 0 in that statement, and an integer value is only true if it is 1.

When you have two boolean values, a and b, if you want to find out if both a and b are true, use * instead of and:

if a and b: #7 chars 

vs

if a*b: #3 chars 

if either value is false, it will evaluate as 0 in that statement, and an integer value is only true if it is nonzero.

Source Link
Justin
  • 21.4k
  • 9
  • 68
  • 117

When you have two boolean values, a and b, if you want to find out if both a and b are true, use * instead of and:

if a and b: #7 chars 

vs

if a*b: #3 chars 

if either value is false, it will evaluate as 0 in that statement, and an integer value is only true if it is 1.