day2/cheatsheet1.tex
changeset 329 0a6ab1d81491
parent 327 c78cad28c2f7
child 330 46533051b9d3
equal deleted inserted replaced
328:4075482a9770 329:0a6ab1d81491
   132 \begin{lstlisting}
   132 \begin{lstlisting}
   133 In []: s = 'Hello'
   133 In []: s = 'Hello'
   134 In []: p = 'World'
   134 In []: p = 'World'
   135 In []: s + p  #concatenating two strings
   135 In []: s + p  #concatenating two strings
   136 Out[]: 'HelloWorld'
   136 Out[]: 'HelloWorld'
   137 In []: s * 4  #repeating string for given num of times
   137 In []: s * 4  #repeat string for given number of times
   138 Out[]: 'HelloHelloHelloHello'
   138 Out[]: 'HelloHelloHelloHello'
   139 \end{lstlisting}
   139 \end{lstlisting}
   140 \subsection{Relational and Logical Operators}
   140 \subsection{Relational and Logical Operators}
   141 \begin{lstlisting}
   141 \begin{lstlisting}
   142 In []: p, z, n = 1, 0, -1 #initializing three variables
   142 In []: p, z, n = 1, 0, -1 #initializing three variables