GitHub Action formats our code with psf/black (#1569)

* GitHub Action formats our code with psf/black

@poyea Your review please.

* fixup! Format Python code with psf/black push
This commit is contained in:
Christian Clauss
2019-11-14 19:59:43 +01:00
committed by GitHub
parent 52cf668617
commit 5df8aec66c
25 changed files with 523 additions and 400 deletions

View File

@@ -1,5 +1,6 @@
# Program to print the elements of a linked list in reverse
class Node:
def __init__(self, data=None):
self.data = data
@@ -16,7 +17,6 @@ class Node:
return string_rep
def make_linked_list(elements_list):
"""Creates a Linked List from the elements of the given sequence
(list/tuple) and returns the head of the Linked List."""
@@ -34,6 +34,7 @@ def make_linked_list(elements_list):
current = current.next
return head
def print_reverse(head_node):
"""Prints the elements of the given Linked List in reverse order"""
@@ -46,8 +47,7 @@ def print_reverse(head_node):
print(head_node.data)
list_data = [14,52,14,12,43]
list_data = [14, 52, 14, 12, 43]
linked_list = make_linked_list(list_data)
print("Linked List:")
print(linked_list)