Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Conditional Operator In Python

DZone's Guide to

Conditional Operator In Python

·
Free Resource
Python sports a slightly different syntax:


value_when_true if condition else value_when_false


Source: http://en.wikipedia.org/wiki/Conditional_operator#Python
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}