DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
python ternary
a = 1 b = 2 1 if a > b else -1 # Output is -1 1 if a > b else -1 if a < b else 0 # Output is -1
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#python
#ternary
ADD COMMENT
Topic
COMMENT
Name
3+7 =
Submit