8000 Update comments for linked list script. · mindaugl/TheAlgorithms_Python@9265bd5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9265bd5

Browse files
committed
Update comments for linked list script.
1 parent a2fa32c commit 9265bd5

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

data_structures/linked_list/from_sequence.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
# Recursive Program to create a Linked List from a sequence and
2-
# print a string representation of it.
1+
"""
2+
Recursive Program to create a Linked List from a sequence and
3+
print a string representation of it.
4+
"""
35

46

57
class Node:
@@ -18,9 +20,11 @@ def __repr__(self):
1820
return string_rep
1921

2022

21-
def make_linked_list(elements_list):
22-
"""Creates a Linked List from the elements of the given sequence
23-
(list/tuple) and returns the head of the Linked List."""
23+
def make_linked_list(elements_list: list) -> Node:
24+
"""
25+
Creates a Linked List from the elements of the given sequence
26+
(list/tuple) and returns the head of the Linked List.
27+
"""
2428

2529
# if elements_list is empty
2630
if not elements_list:

0 commit comments

Comments
 (0)
0