mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-24 13:31:07 +00:00
feature to add input (#749)
This commit is contained in:
parent
56de3df784
commit
137871bfef
|
@ -70,16 +70,20 @@ class Linked_List:
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
A = Linked_List()
|
A = Linked_List()
|
||||||
print("Inserting 10 at Head")
|
print("Inserting 1st at Head")
|
||||||
A.insert_head(10)
|
a1=input()
|
||||||
print("Inserting 0 at Head")
|
A.insert_head(a1)
|
||||||
A.insert_head(0)
|
print("Inserting 2nd at Head")
|
||||||
|
a2=input()
|
||||||
|
A.insert_head(a2)
|
||||||
print("\nPrint List : ")
|
print("\nPrint List : ")
|
||||||
A.printList()
|
A.printList()
|
||||||
print("\nInserting 100 at Tail")
|
print("\nInserting 1st at Tail")
|
||||||
A.insert_tail(100)
|
a3=input()
|
||||||
print("Inserting 1000 at Tail")
|
A.insert_tail(a3)
|
||||||
A.insert_tail(1000)
|
print("Inserting 2nd at Tail")
|
||||||
|
a4=input()
|
||||||
|
A.insert_tail(a4)
|
||||||
print("\nPrint List : ")
|
print("\nPrint List : ")
|
||||||
A.printList()
|
A.printList()
|
||||||
print("\nDelete Head")
|
print("\nDelete Head")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user