We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2fa32c commit 9265bd5Copy full SHA for 9265bd5
1 file changed
data_structures/linked_list/from_sequence.py
@@ -1,5 +1,7 @@
1
-# Recursive Program to create a Linked List from a sequence and
2
-# print a string representation of it.
+"""
+Recursive Program to create a Linked List from a sequence and
3
+print a string representation of it.
4
5
6
7
class Node:
@@ -18,9 +20,11 @@ def __repr__(self):
18
20
return string_rep
19
21
22
-def make_linked_list(elements_list):
- """Creates a Linked List from the elements of the given sequence
23
- (list/tuple) and returns the head of the Linked List."""
+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
28
29
# if elements_list is empty
30
if not elements_list:
0 commit comments