Skip to content
Snippets Groups Projects
Commit 1bd053d0 authored by Martin Mareš's avatar Martin Mareš
Browse files

06: in a lexikografické porovnávání

parent e795d2b2
No related branches found
No related tags found
No related merge requests found
......@@ -67,6 +67,12 @@ x[::-1]
\begin{frame}{Operace se seznamy}
\py{%
3 in [1, 2, 3, 4, 5]
}{%
True \cmt{(projde seznam a zjistí, zda v něm je daný prvek)}
}
\py{%
x = [1, 2, 3, 4, 5] \\
x.pop() \cmt{(odebere z konce)}
......@@ -228,4 +234,40 @@ help("")
% ----------------------------------------------------------------------
\begin{frame}{Lexikografické porovnávání}
\py{%
[1, 2, 3] < [1, 2, 5]
}{%
True
}
\py{%
[1, 2, 3] < [1, 2, 3, 4]
}{%
True
}
\py{%
[1, 2, 3] == [1, 2, 3]
}{%
True
}
\py{%
"červ" > "čert"
}{%
True
}
\py{%
"červ" > "datel"
}{%
True \cmt{(pozor, nerespektuje česká pravidla)}
}
\end{frame}
% ----------------------------------------------------------------------
\end{document}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment