We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56de3df commit 137871bCopy full SHA for 137871b
data_structures/linked_list/singly_linked_list.py
@@ -70,16 +70,20 @@ def reverse(self):
70
71
def main():
72
A = Linked_List()
73
- print("Inserting 10 at Head")
74
- A.insert_head(10)
75
- print("Inserting 0 at Head")
76
- A.insert_head(0)
+ print("Inserting 1st at Head")
+ a1=input()
+ A.insert_head(a1)
+ print("Inserting 2nd at Head")
77
+ a2=input()
78
+ A.insert_head(a2)
79
print("\nPrint List : ")
80
A.printList()
- print("\nInserting 100 at Tail")
- A.insert_tail(100)
81
- print("Inserting 1000 at Tail")
82
- A.insert_tail(1000)
+ print("\nInserting 1st at Tail")
+ a3=input()
83
+ A.insert_tail(a3)
84
+ print("Inserting 2nd at Tail")
85
+ a4=input()
86
+ A.insert_tail(a4)
87
88
89
print("\nDelete Head")
0 commit comments