DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
is there a replacement for ternary operator in python
>>> a = 10 >>> b = 5 >>> largest = (b, a)[a > b] >>> print(largest)
Source by techvidvan.com #
PREVIOUS
NEXT
Tagged:
#replacement
#ternary
#operator
#python
ADD COMMENT
Topic
COMMENT
Name
4+8 =
Submit