\section{Basics}
\begin{frame}[fragile]
- \frametitle{Basictypes}
- \begin{block}{types}
- \begin{tabular}{ll}
- \mintinline{python}{bool} & \mintinline{python}{True, False}\\
- \mintinline{python}{int} & \mintinline{python}{1, -4, 999}\\
- \mintinline{python}{complex} & \mintinline{python}{4j+1, j}\\
- \mintinline{python}{float} & \mintinline{python}
- {1.0, 4.5, 5e9, float('NaN'), float('inf')}\\
- \mintinline{python}{str} & \mintinline{python}
- {'hi', "hi", '"', "'", """hi"""}\\
- \mintinline{python}{list} & \mintinline{python}
- {[], ..., [1, 2, 3], ['a', 42], [[], [1]]}\\
- \mintinline{python}{tuple} & \mintinline{python}
- {(1,), (1,2), (1, 'a', True), ((4, 3), 4)}
- \end{tabular}
- \end{block}
+ \frametitle{Built-in types}
+ \begin{tabular}{ll}
+ \mintinline{python}{bool} & \mintinline{python}{True, False}\\
+ \mintinline{python}{int} & \mintinline{python}{1, -4, 999}\\
+ \mintinline{python}{complex} & \mintinline{python}{4j+1, j}\\
+ \mintinline{python}{float} & \mintinline{python}
+ {1.0, 4.5, 5e9, float('NaN'), float('inf')}\\
+ \mintinline{python}{str} & \mintinline{python}
+ {'hi', "hi", '"', "'", """hi""", "\n\"\t", '\"'}\\
+ \mintinline{python}{list} & \mintinline{python}
+ {[], ..., [1, 2, 3], ['a', 42], [[], [1]]}\\
+ \mintinline{python}{tuple} & \mintinline{python}
+ {(1,), (1,2), (1, 'a', True), ((4, 3), 4)}\\
+ \mintinline{python}{dict} & \mintinline{python}
+ {{1: 'a', 2: 'b'}, {"hi": 42, "test": {}}, {}}\\
+ \mintinline{python}{set} & \mintinline{python}
+ {{1, 2}, {"hi", "a"}, set()}\\
+ Others & \mintinline{python}
+ {range, bytes, bytearray, memoryview, frozenset}\\
+ Special & \mintinline{python}
+ {type, None, ..., NotImplemented}\\
+ \end{tabular}
+\end{frame}
+
+\begin{frame}[fragile]
+ \frametitle{Basictypes: Operators}
\begin{block}{operators}
\begin{itemize}
\item Numbers: \mintinline{python}{+ - / * // % @ **}
- \item Comparison: \mintinline{python}{< <= > >= == != is}
+ \item Comparison: \mintinline{python}{< <= > >= == !=}
\item Boolean: \mintinline{python}{and or not}
\item Bitwise: \mintinline{python}{& | ^ ~ << >>}
- \item List: \mintinline{python}{[i] [i:j] in}
+ \item List/Dictionary: \mintinline{python}{[i] [i:j] in}
\item In place: \mintinline{python}{*= += ...}
+ \item Special: \mintinline{python}{is}
\end{itemize}
\end{block}
\end{frame}