Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Čermák Petr
Prm1
Commits
1bd053d0
Commit
1bd053d0
authored
Nov 03, 2019
by
Mareš Martin
Browse files
06: in a lexikografické porovnávání
parent
e795d2b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
06-rezy/06-rezy.tex
View file @
1bd053d0
...
...
@@ -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}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment