Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python turn true or false into 0 or 1

# Use int() on a boolean test:

x = int(true_or_false)

# int() turns the boolean into 1 or 0.
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #turn #true #false
ADD COMMENT
Topic
Name
6+3 =