diff options
-rw-r--r-- | day1/session2.tex | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/day1/session2.tex b/day1/session2.tex index b9654c1..a9a204f 100644 --- a/day1/session2.tex +++ b/day1/session2.tex @@ -246,7 +246,7 @@ Out[]: 7 \begin{frame}[fragile] \frametitle{List: Slicing} - \typ{list[initial:final:step]} +list[initial:final:step] \begin{lstlisting} In []: lst[1:3] # A slice. Out[]: [2, 3] @@ -259,15 +259,15 @@ Out[]: [2, 3] \begin{frame}[fragile] \frametitle{List methods} \begin{lstlisting} -In []: lst.append([6,7]) +In []: lst.append(6) In []: lst -Out[]: [1, 2, 3, 4, 5, [6, 7]] +Out[]: [1, 2, 3, 4, 5, 6] \end{lstlisting} %\inctime{10} \end{frame} \begin{frame}[fragile] -\frametitle{\typ{for}} +\frametitle{\texttt{for}} Used to iterate over lists\\ Let us look at another example. \begin{lstlisting} In []: lst = [1,2,3,4,5,6] |