day1/session2.tex
changeset 188 15f29c7fd925
parent 183 b34c3a22d726
child 194 7288d3867df2
equal deleted inserted replaced
183:b34c3a22d726 188:15f29c7fd925
   133 \end{frame}
   133 \end{frame}
   134 
   134 
   135 \begin{frame}
   135 \begin{frame}
   136 \frametitle{But its impractical..}
   136 \frametitle{But its impractical..}
   137 \begin{itemize}
   137 \begin{itemize}
   138   \item We can't keep running the IPython shell for days
   138   \item We can't keep running IPython for days
   139   \item And its a pain to go back and edit
   139   \item And its a pain to go back and edit
   140 \end{itemize}
   140 \end{itemize}
   141 And the solution is..\\
   141 And the solution is..\\
   142 \begin{center}
   142 \begin{center}
   143 \alert {\typ{Scripts!!}}
   143 \alert {\typ{Scripts!!}}
   231 \end{lstlisting}
   231 \end{lstlisting}
   232 \end{frame}
   232 \end{frame}
   233 
   233 
   234 \begin{frame}[fragile]
   234 \begin{frame}[fragile]
   235   \frametitle{List: Slicing}
   235   \frametitle{List: Slicing}
       
   236   \begin{block}{Remember\ldots}
       
   237 	In []: lst = [1,2,3,4,5] 
       
   238   \end{block}
   236 \alert{\typ{list[initial:final:step]}}
   239 \alert{\typ{list[initial:final:step]}}
   237 \begin{lstlisting}
   240 \begin{lstlisting}
   238 In []: lst[1:3]  # A slice.
   241 In []: lst[1:3]  # A slice.
   239 Out[]: [2, 3]
   242 Out[]: [2, 3]
   240 
   243 
   242 Out[]: [2, 3]
   245 Out[]: [2, 3]
   243 \end{lstlisting}
   246 \end{lstlisting}
   244 \end{frame}
   247 \end{frame}
   245 
   248 
   246 \begin{frame}[fragile]
   249 \begin{frame}[fragile]
   247   \frametitle{List concatenation and list methods}
   250   \frametitle{List operations}
   248 \begin{lstlisting}
   251 \begin{lstlisting}
   249 In []: anthrlst = [6,7,8,9]
   252 In []: anthrlst = [6,7,8,9]
   250 In []: lnglst = lst + anthrlst
   253 In []: lnglst = lst + anthrlst
   251 
   254 
   252 In []: lnglst
   255 In []: lnglst