conditionals/quickref.tex
author bhanu
Mon, 15 Nov 2010 14:40:49 +0530
changeset 499 fff4a90b2310
parent 439 b437ff7def95
permissions -rw-r--r--
Language check done for `least square fit`

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.