We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 48aa4c4 commit f89d3a9Copy full SHA for f89d3a9
data_structures/linked_list/singly_linked_list.py
@@ -12,7 +12,7 @@ def __init__(self):
12
self.Head = None # Initialize Head to None
13
14
def insert_tail(self, data):
15
- if(self.Head == None): self.insert_head(data) #If this is first node, call insert_head
+ if(self.Head is None): self.insert_head(data) #If this is first node, call insert_head
16
else:
17
temp = self.Head
18
while(temp.next != None): #traverse to last node
@@ -50,7 +50,7 @@ def delete_tail(self): # delete from tail
50
return tamp
51
52
def isEmpty(self):
53
- return self.Head == None # Return if Head is none
+ return self.Head is None # Return if Head is none
54
55
def reverse(self):
56
prev = None
0 commit comments