We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`Head` and `temp` names should change
Hi,

In your [Linked List implementation](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py), I think `temp` is wrongly spelled as `tamp`. The code works but for readability purpose all `tamp` should be replaced by `temp`.

Also, I find it strange to name the `head` with a capital `Head`. Generally, capitalization in Python is saved for Class names, not class attributes or methods. If you think the code should be more *Pythonic*, please consider changing all `Head` to `head` in the class attributes for Linked List.



--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `data_structures/linked_list/singly_linked_list.py`
Content:
```
1 class Node:  # create a Node
2     def __init__(self, data):
3         self.data = data  # given data
4         self.next = None  # given next to None
5 
6 
7 class Linked_List:
8     def __init__(self):
9         self.Head = None  # Initialize Head to None
10 
11     def insert_tail(self, data):
12         if self.Head is None:
13             self.insert_head(data)  # If this is first node, call insert_head
14         else:
15             temp = self.Head
16             while temp.next != None:  # traverse to last node
17                 temp = temp.next
18             temp.next = Node(data)  # create node & link to tail
19 
20     def insert_head(self, data):
21         newNod = Node(data)  # create a new node
22         if self.Head != None:
23             newNod.next = self.Head  # link newNode to head
24         self.Head = newNod  # make NewNode as Head
25 
26     def printList(self):  # print every node data
27         tamp = self.Head
28         while tamp is not None:
29             print(tamp.data)
30             tamp = tamp.next
31 
32     def delete_head(self):  # delete from head
33         temp = self.Head
34         if self.Head != None:
35             self.Head = self.Head.next
36             temp.next = None
37         return temp
38 
39     def delete_tail(self):  # delete from tail
40         tamp = self.Head
41         if self.Head != None:
42             if self.Head.next is None:  # if Head is the only Node in the Linked List
43                 self.Head = None
44             else:
45                 while tamp.next.next is not None:  # find the 2nd last element
46                     tamp = tamp.next
47                 tamp.next, tamp = (
48                     None,
49                     tamp.next,
50                 )  # (2nd last element).next = None and tamp = last element
51         return tamp
52 
53     def isEmpty(self):
54         return self.Head is None  # Return if Head is none
55 
56     def reverse(self):
57         prev = None
58         current = self.Head
59 
60         while current:
61             # Store the current node's next node.
62             next_node = current.next
63             # Make the current node's next point backwards
64             current.next = prev
65             # Make the previous node be the current node
66             prev = current
67             # Make the current node the next node (to progress iteration)
68             current = next_node
69         # Return prev in order to put the head at the end
70         self.Head = prev
71 
72 
73 def main():
74     A = Linked_List()
75     print("Inserting 1st at Head")
76     a1 = input()
77     A.insert_head(a1)
78     print("Inserting 2nd at Head")
79     a2 = input()
80     A.insert_head(a2)
81     print("\nPrint List : ")
82     A.printList()
83     print("\nInserting 1st at Tail")
84     a3 = input()
85     A.insert_tail(a3)
86     print("Inserting 2nd at Tail")
87     a4 = input()
88     A.insert_tail(a4)
89     print("\nPrint List : ")
90     A.printList()
91     print("\nDelete Head")
92     A.delete_head()
93     print("Delete Tail")
94     A.delete_tail()
95     print("\nPrint List : ")
96     A.printList()
97     print("\nReverse Linked List")
98     A.reverse()
99     print("\nPrint List : ")
100     A.printList()
101 
102 
103 if __name__ == "__main__":
104     main()
105
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/data_structures/linked_list/singly_linked_list.py b/data_structures/linked_list/singly_linked_list.py
--- a/data_structures/linked_list/singly_linked_list.py
+++ b/data_structures/linked_list/singly_linked_list.py
@@ -6,56 +6,56 @@
 
 class Linked_List:
     def __init__(self):
-        self.Head = None  # Initialize Head to None
+        self.head = None  # Initialize head to None
 
     def insert_tail(self, data):
-        if self.Head is None:
+        if self.head is None:
             self.insert_head(data)  # If this is first node, call insert_head
         else:
-            temp = self.Head
+            temp = self.head
             while temp.next != None:  # traverse to last node
                 temp = temp.next
             temp.next = Node(data)  # create node & link to tail
 
     def insert_head(self, data):
         newNod = Node(data)  # create a new node
-        if self.Head != None:
-            newNod.next = self.Head  # link newNode to head
-        self.Head = newNod  # make NewNode as Head
+        if self.head != None:
+            newNod.next = self.head  # link newNode to head
+        self.head = newNod  # make NewNode as head
 
     def printList(self):  # print every node data
-        tamp = self.Head
-        while tamp is not None:
-            print(tamp.data)
-            tamp = tamp.next
+        temp = self.head
+        while temp is not None:
+            print(temp.data)
+            temp = temp.next
 
     def delete_head(self):  # delete from head
-        temp = self.Head
-        if self.Head != None:
-            self.Head = self.Head.next
+        temp = self.head
+        if self.head != None:
+            self.head = self.head.next
             temp.next = None
         return temp
 
     def delete_tail(self):  # delete from tail
-        tamp = self.Head
-        if self.Head != None:
-            if self.Head.next is None:  # if Head is the only Node in the Linked List
-                self.Head = None
+        temp = self.head
+        if self.head != None:
+            if self.head.next is None:  # if head is the only Node in the Linked List
+                self.head = None
             else:
-                while tamp.next.next is not None:  # find the 2nd last element
-                    tamp = tamp.next
-                tamp.next, tamp = (
+                while temp.next.next is not None:  # find the 2nd last element
+                    temp = temp.next
+                temp.next, temp = (
                     None,
-                    tamp.next,
-                )  # (2nd last element).next = None and tamp = last element
-        return tamp
+                    temp.next,
+                )  # (2nd last element).next = None and temp = last element
+        return temp
 
     def isEmpty(self):
-        return self.Head is None  # Return if Head is none
+        return self.head is None  # Return if head is none
 
     def reverse(self):
         prev = None
-        current = self.Head
+        current = self.head
 
         while current:
             # Store the current node's next node.
@@ -67,15 +67,15 @@
             # Make the current node the next node (to progress iteration)
             current = next_node
         # Return prev in order to put the head at the end
-        self.Head = prev
+        self.head = prev
 
 
 def main():
     A = Linked_List()
-    print("Inserting 1st at Head")
+    print("Inserting 1st at head")
     a1 = input()
     A.insert_head(a1)
-    print("Inserting 2nd at Head")
+    print("Inserting 2nd at head")
     a2 = input()
     A.insert_head(a2)
     print("\nPrint List : ")
@@ -88,7 +88,7 @@
     A.insert_tail(a4)
     print("\nPrint List : ")
     A.printList()
-    print("\nDelete Head")
+    print("\nDelete head")
     A.delete_head()
     print("Delete Tail")
     A.delete_tail()

{"golden_diff": "diff --git a/data_structures/linked_list/singly_linked_list.py b/data_structures/linked_list/singly_linked_list.py\n--- a/data_structures/linked_list/singly_linked_list.py\n+++ b/data_structures/linked_list/singly_linked_list.py\n@@ -6,56 +6,56 @@\n \n class Linked_List:\n     def __init__(self):\n-        self.Head = None  # Initialize Head to None\n+        self.head = None  # Initialize head to None\n \n     def insert_tail(self, data):\n-        if self.Head is None:\n+        if self.head is None:\n             self.insert_head(data)  # If this is first node, call insert_head\n         else:\n-            temp = self.Head\n+            temp = self.head\n             while temp.next != None:  # traverse to last node\n                 temp = temp.next\n             temp.next = Node(data)  # create node & link to tail\n \n     def insert_head(self, data):\n         newNod = Node(data)  # create a new node\n-        if self.Head != None:\n-            newNod.next = self.Head  # link newNode to head\n-        self.Head = newNod  # make NewNode as Head\n+        if self.head != None:\n+            newNod.next = self.head  # link newNode to head\n+        self.head = newNod  # make NewNode as head\n \n     def printList(self):  # print every node data\n-        tamp = self.Head\n-        while tamp is not None:\n-            print(tamp.data)\n-            tamp = tamp.next\n+        temp = self.head\n+        while temp is not None:\n+            print(temp.data)\n+            temp = temp.next\n \n     def delete_head(self):  # delete from head\n-        temp = self.Head\n-        if self.Head != None:\n-            self.Head = self.Head.next\n+        temp = self.head\n+        if self.head != None:\n+            self.head = self.head.next\n             temp.next = None\n         return temp\n \n     def delete_tail(self):  # delete from tail\n-        tamp = self.Head\n-        if self.Head != None:\n-            if self.Head.next is None:  # if Head is the only Node in the Linked List\n-                self.Head = None\n+        temp = self.head\n+        if self.head != None:\n+            if self.head.next is None:  # if head is the only Node in the Linked List\n+                self.head = None\n             else:\n-                while tamp.next.next is not None:  # find the 2nd last element\n-                    tamp = tamp.next\n-                tamp.next, tamp = (\n+                while temp.next.next is not None:  # find the 2nd last element\n+                    temp = temp.next\n+                temp.next, temp = (\n                     None,\n-                    tamp.next,\n-                )  # (2nd last element).next = None and tamp = last element\n-        return tamp\n+                    temp.next,\n+                )  # (2nd last element).next = None and temp = last element\n+        return temp\n \n     def isEmpty(self):\n-        return self.Head is None  # Return if Head is none\n+        return self.head is None  # Return if head is none\n \n     def reverse(self):\n         prev = None\n-        current = self.Head\n+        current = self.head\n \n         while current:\n             # Store the current node's next node.\n@@ -67,15 +67,15 @@\n             # Make the current node the next node (to progress iteration)\n             current = next_node\n         # Return prev in order to put the head at the end\n-        self.Head = prev\n+        self.head = prev\n \n \n def main():\n     A = Linked_List()\n-    print(\"Inserting 1st at Head\")\n+    print(\"Inserting 1st at head\")\n     a1 = input()\n     A.insert_head(a1)\n-    print(\"Inserting 2nd at Head\")\n+    print(\"Inserting 2nd at head\")\n     a2 = input()\n     A.insert_head(a2)\n     print(\"\\nPrint List : \")\n@@ -88,7 +88,7 @@\n     A.insert_tail(a4)\n     print(\"\\nPrint List : \")\n     A.printList()\n-    print(\"\\nDelete Head\")\n+    print(\"\\nDelete head\")\n     A.delete_head()\n     print(\"Delete Tail\")\n     A.delete_tail()\n", "issue": "`Head` and `temp` names should change\nHi,\r\n\r\nIn your [Linked List implementation](https://github.com/TheAlgorithms/Python/blob/master/data_structures/linked_list/singly_linked_list.py), I think `temp` is wrongly spelled as `tamp`. The code works but for readability purpose all `tamp` should be replaced by `temp`.\r\n\r\nAlso, I find it strange to name the `head` with a capital `Head`. Generally, capitalization in Python is saved for Class names, not class attributes or methods. If you think the code should be more *Pythonic*, please consider changing all `Head` to `head` in the class attributes for Linked List.\r\n\r\n\n", "before_files": [{"content": "class Node:  # create a Node\n    def __init__(self, data):\n        self.data = data  # given data\n        self.next = None  # given next to None\n\n\nclass Linked_List:\n    def __init__(self):\n        self.Head = None  # Initialize Head to None\n\n    def insert_tail(self, data):\n        if self.Head is None:\n            self.insert_head(data)  # If this is first node, call insert_head\n        else:\n            temp = self.Head\n            while temp.next != None:  # traverse to last node\n                temp = temp.next\n            temp.next = Node(data)  # create node & link to tail\n\n    def insert_head(self, data):\n        newNod = Node(data)  # create a new node\n        if self.Head != None:\n            newNod.next = self.Head  # link newNode to head\n        self.Head = newNod  # make NewNode as Head\n\n    def printList(self):  # print every node data\n        tamp = self.Head\n        while tamp is not None:\n            print(tamp.data)\n            tamp = tamp.next\n\n    def delete_head(self):  # delete from head\n        temp = self.Head\n        if self.Head != None:\n            self.Head = self.Head.next\n            temp.next = None\n        return temp\n\n    def delete_tail(self):  # delete from tail\n        tamp = self.Head\n        if self.Head != None:\n            if self.Head.next is None:  # if Head is the only Node in the Linked List\n                self.Head = None\n            else:\n                while tamp.next.next is not None:  # find the 2nd last element\n                    tamp = tamp.next\n                tamp.next, tamp = (\n                    None,\n                    tamp.next,\n                )  # (2nd last element).next = None and tamp = last element\n        return tamp\n\n    def isEmpty(self):\n        return self.Head is None  # Return if Head is none\n\n    def reverse(self):\n        prev = None\n        current = self.Head\n\n        while current:\n            # Store the current node's next node.\n            next_node = current.next\n            # Make the current node's next point backwards\n            current.next = prev\n            # Make the previous node be the current node\n            prev = current\n            # Make the current node the next node (to progress iteration)\n            current = next_node\n        # Return prev in order to put the head at the end\n        self.Head = prev\n\n\ndef main():\n    A = Linked_List()\n    print(\"Inserting 1st at Head\")\n    a1 = input()\n    A.insert_head(a1)\n    print(\"Inserting 2nd at Head\")\n    a2 = input()\n    A.insert_head(a2)\n    print(\"\\nPrint List : \")\n    A.printList()\n    print(\"\\nInserting 1st at Tail\")\n    a3 = input()\n    A.insert_tail(a3)\n    print(\"Inserting 2nd at Tail\")\n    a4 = input()\n    A.insert_tail(a4)\n    print(\"\\nPrint List : \")\n    A.printList()\n    print(\"\\nDelete Head\")\n    A.delete_head()\n    print(\"Delete Tail\")\n    A.delete_tail()\n    print(\"\\nPrint List : \")\n    A.printList()\n    print(\"\\nReverse Linked List\")\n    A.reverse()\n    print(\"\\nPrint List : \")\n    A.printList()\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "data_structures/linked_list/singly_linked_list.py"}], "after_files": [{"content": "class Node:  # create a Node\n    def __init__(self, data):\n        self.data = data  # given data\n        self.next = None  # given next to None\n\n\nclass Linked_List:\n    def __init__(self):\n        self.head = None  # Initialize head to None\n\n    def insert_tail(self, data):\n        if self.head is None:\n            self.insert_head(data)  # If this is first node, call insert_head\n        else:\n            temp = self.head\n            while temp.next != None:  # traverse to last node\n                temp = temp.next\n            temp.next = Node(data)  # create node & link to tail\n\n    def insert_head(self, data):\n        newNod = Node(data)  # create a new node\n        if self.head != None:\n            newNod.next = self.head  # link newNode to head\n        self.head = newNod  # make NewNode as head\n\n    def printList(self):  # print every node data\n        temp = self.head\n        while temp is not None:\n            print(temp.data)\n            temp = temp.next\n\n    def delete_head(self):  # delete from head\n        temp = self.head\n        if self.head != None:\n            self.head = self.head.next\n            temp.next = None\n        return temp\n\n    def delete_tail(self):  # delete from tail\n        temp = self.head\n        if self.head != None:\n            if self.head.next is None:  # if head is the only Node in the Linked List\n                self.head = None\n            else:\n                while temp.next.next is not None:  # find the 2nd last element\n                    temp = temp.next\n                temp.next, temp = (\n                    None,\n                    temp.next,\n                )  # (2nd last element).next = None and temp = last element\n        return temp\n\n    def isEmpty(self):\n        return self.head is None  # Return if head is none\n\n    def reverse(self):\n        prev = None\n        current = self.head\n\n        while current:\n            # Store the current node's next node.\n            next_node = current.next\n            # Make the current node's next point backwards\n            current.next = prev\n            # Make the previous node be the current node\n            prev = current\n            # Make the current node the next node (to progress iteration)\n            current = next_node\n        # Return prev in order to put the head at the end\n        self.head = prev\n\n\ndef main():\n    A = Linked_List()\n    print(\"Inserting 1st at head\")\n    a1 = input()\n    A.insert_head(a1)\n    print(\"Inserting 2nd at head\")\n    a2 = input()\n    A.insert_head(a2)\n    print(\"\\nPrint List : \")\n    A.printList()\n    print(\"\\nInserting 1st at Tail\")\n    a3 = input()\n    A.insert_tail(a3)\n    print(\"Inserting 2nd at Tail\")\n    a4 = input()\n    A.insert_tail(a4)\n    print(\"\\nPrint List : \")\n    A.printList()\n    print(\"\\nDelete head\")\n    A.delete_head()\n    print(\"Delete Tail\")\n    A.delete_tail()\n    print(\"\\nPrint List : \")\n    A.printList()\n    print(\"\\nReverse Linked List\")\n    A.reverse()\n    print(\"\\nPrint List : \")\n    A.printList()\n\n\nif __name__ == \"__main__\":\n    main()\n", "path": "data_structures/linked_list/singly_linked_list.py"}]}