Skip to content

Commit

Permalink
Merge pull request keshavsingh4522#524 from b-suryaraj/master
Browse files Browse the repository at this point in the history
Create linked_list.py
  • Loading branch information
keshavsingh4522 authored Oct 2, 2021
2 parents aa10596 + f2e6b85 commit 7ebe1f6
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions Python/linked_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class Node:
def __init__(self, data=None):
self.data = data
self.next = None

class LnkdList:
def __init__(self):
self.head = None

l1 = LnkdList()
l1.head = Node("Mon")
e2 = Node("Tue")
e3 = Node("Wed")
# Link first Node to second node
l1.head.next = e2
# Link second Node to third node
e2.next = e3

0 comments on commit 7ebe1f6

Please sign in to comment.