Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python conditional operator one line

fruit = 'Apple'
isApple = True if fruit == 'Apple' else False
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #conditional #operator #line
ADD COMMENT
Topic
Name
1+9 =