conditionals/quickref.tex
author anand
Mon, 15 Nov 2010 15:15:50 +0530
changeset 508 a9a87fe550c1
parent 439 b437ff7def95
permissions -rw-r--r--
checklist ok for `sets`

Writing an if/elif/else block:
\begin{lstlisting}
if condition1:
   # do A, B, C
elif condition2:
   # do D, E
else:
   # do Y, Z
\end{lstlisting}

The ternary operator:
{\ex \lstinline|    C if X else Y|} -- Do C if X is True else do Y.