conditionals/quickref.tex
author Anoop Jacob Thomas<anoop@fossee.in>
Wed, 10 Nov 2010 19:00:23 +0530
changeset 446 2ce824b5adf4
parent 439 b437ff7def95
permissions -rw-r--r--
removed unwanted data from slides.org file for getting started with functions.

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.