Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
added 5 characters in body
Source Link
aloisdg
  • 2.1k
  • 17
  • 26

Convert boolean to integer with and/or

Convert boolean to integer with && and ||

if bool,do:1,else:0

vs

boolean &&1||0

source

Convert boolean to integer with and/or

if bool,do:1,else:0

vs

boolean &&1||0

source

Convert boolean to integer with && and ||

if bool,do:1,else:0

vs

boolean &&1||0

source

Source Link
aloisdg
  • 2.1k
  • 17
  • 26

Convert boolean to integer with and/or

if bool,do:1,else:0

vs

boolean &&1||0

source