1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
| \lstset{ language=Python, basicstyle=\small\ttfamily, commentstyle=\color{gray}, keywordstyle=\color{blue}\bfseries, stringstyle=\color{red}, showstringspaces=false, numbers=left, numberstyle=\tiny\color{gray}, stepnumber=1, numbersep=10pt, tabsize=4, showspaces=false, showtabs=false, breaklines=true, breakatwhitespace=true, aboveskip=\bigskipamount, belowskip=\bigskipamount, frame=single }
\begin{lstlisting} print("hello world!") for qid in range(hs.shape[0]): if qid < 1: lvl = 0 elif qid >= 1 and qid < 3: lvl = 1 elif qid >= 3 and qid < 6: lvl = 2 elif qid >= 6 and qid < 11: lvl = 3 \end{lstlisting}
|