Remove Multiple Unused Imports and Variable

This commit is contained in:
ParthS007
2018-10-18 02:58:57 +05:30
parent 765a3267fc
commit 0856a61859
22 changed files with 34 additions and 50 deletions

View File

@ -24,7 +24,7 @@ class LinkedList:
temp = self.head
self.head = self.head.next # oldHead <--> 2ndElement(head)
self.head.previous = None # oldHead --> 2ndElement(head) nothing pointing at it so the old head will be removed
if(self.head == None):
if(self.head is None):
self.tail = None
return temp
@ -58,7 +58,7 @@ class LinkedList:
current.next.previous = current.previous # 1 <--> 3
def isEmpty(self): #Will return True if the list is empty
return(self.head == None)
return(self.head is None)
def display(self): #Prints contents of the list
current = self.head

View File

@ -19,4 +19,4 @@ class LinkedList:
return item
def is_empty(self):
return self.head == None
return self.head is None

View File

@ -67,3 +67,4 @@ class Linked_List:
current = next_node
# Return prev in order to put the head at the end
Head = prev
return Head