Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
prm2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Martin Mareš
prm2
Commits
1be075ab
Commit
1be075ab
authored
2 months ago
by
Martin Mareš
Browse files
Options
Downloads
Patches
Plain Diff
Seznamy: Preferujeme is
parent
d4b891f8
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
07-seznamy/jednosmerne-na-konec.py
+2
-2
2 additions, 2 deletions
07-seznamy/jednosmerne-na-konec.py
07-seznamy/jednosmerne-na-zacatek.py
+1
-1
1 addition, 1 deletion
07-seznamy/jednosmerne-na-zacatek.py
07-seznamy/obousmerne.py
+1
-1
1 addition, 1 deletion
07-seznamy/obousmerne.py
with
4 additions
and
4 deletions
07-seznamy/jednosmerne-na-konec.py
+
2
−
2
View file @
1be075ab
...
@@ -18,7 +18,7 @@ class MyList:
...
@@ -18,7 +18,7 @@ class MyList:
def
append
(
self
,
x
):
def
append
(
self
,
x
):
"""
Zapojí prvek se zadanou hodnotu na konec seznamu.
"""
"""
Zapojí prvek se zadanou hodnotu na konec seznamu.
"""
n
=
MyNode
(
x
)
n
=
MyNode
(
x
)
if
self
.
last
:
if
self
.
last
is
not
None
:
self
.
last
.
next
=
n
self
.
last
.
next
=
n
else
:
else
:
self
.
first
=
n
self
.
first
=
n
...
@@ -26,7 +26,7 @@ class MyList:
...
@@ -26,7 +26,7 @@ class MyList:
def
print
(
self
):
def
print
(
self
):
n
=
self
.
first
n
=
self
.
first
while
n
:
while
n
is
not
None
:
print
(
n
.
value
)
print
(
n
.
value
)
n
=
n
.
next
n
=
n
.
next
...
...
This diff is collapsed.
Click to expand it.
07-seznamy/jednosmerne-na-zacatek.py
+
1
−
1
View file @
1be075ab
...
@@ -22,7 +22,7 @@ class MyList:
...
@@ -22,7 +22,7 @@ class MyList:
def
print
(
self
):
def
print
(
self
):
n
=
self
.
first
n
=
self
.
first
while
n
:
while
n
is
not
None
:
print
(
n
.
value
)
print
(
n
.
value
)
n
=
n
.
next
n
=
n
.
next
...
...
This diff is collapsed.
Click to expand it.
07-seznamy/obousmerne.py
+
1
−
1
View file @
1be075ab
...
@@ -43,7 +43,7 @@ class MyList:
...
@@ -43,7 +43,7 @@ class MyList:
def
print
(
self
):
def
print
(
self
):
n
=
self
.
head
.
next
n
=
self
.
head
.
next
while
n
!=
self
.
head
:
while
n
is
not
self
.
head
:
print
(
n
.
value
)
print
(
n
.
value
)
n
=
n
.
next
n
=
n
.
next
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment