conditionals/quickref.tex
author Anoop Jacob Thomas<anoop@fossee.in>
Sat, 18 Dec 2010 12:54:49 +0530
changeset 524 b602b4dcc87d
parent 439 b437ff7def95
permissions -rw-r--r--
Made some changes to the script embellishing a plot, but it still needs changes.

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.