diff options
Diffstat (limited to 'basic_python')
-rw-r--r-- | basic_python/basics.tex | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/basic_python/basics.tex b/basic_python/basics.tex index 4201302..d21f893 100644 --- a/basic_python/basics.tex +++ b/basic_python/basics.tex @@ -159,6 +159,23 @@ TypeError: 'str' object does not \end{lstlisting} \end{frame} +\begin{frame}[fragile] + \frametitle{Finding the type} +\begin{lstlisting} +In []: a = 1.0 +In []: type(a) +Out[]: float +In []: type(1) +Out[]: int + +In []: type(1+1j) +Out[]: complex + +In []: type('hello') +Out[]: str +\end{lstlisting} +\end{frame} + \section{Operators} \begin{frame}[fragile] |