From 0e6e5056b3fede1705c6081543bb129b97ff4d35 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Tue, 19 May 2020 13:54:25 +0200 Subject: [PATCH] singly_linked_list.py: psf/black (#2008) * singly_linked_list.py: psf/black * updating DIRECTORY.md * Update singly_linked_list.py Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> --- DIRECTORY.md | 1 + data_structures/linked_list/singly_linked_list.py | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/DIRECTORY.md b/DIRECTORY.md index bef7bca86..aea74f925 100644 --- a/DIRECTORY.md +++ b/DIRECTORY.md @@ -295,6 +295,7 @@ * [Add](https://github.com/TheAlgorithms/Python/blob/master/maths/add.py) * [Aliquot Sum](https://github.com/TheAlgorithms/Python/blob/master/maths/aliquot_sum.py) * [Allocation Number](https://github.com/TheAlgorithms/Python/blob/master/maths/allocation_number.py) + * [Area](https://github.com/TheAlgorithms/Python/blob/master/maths/area.py) * [Area Under Curve](https://github.com/TheAlgorithms/Python/blob/master/maths/area_under_curve.py) * [Armstrong Numbers](https://github.com/TheAlgorithms/Python/blob/master/maths/armstrong_numbers.py) * [Average Mean](https://github.com/TheAlgorithms/Python/blob/master/maths/average_mean.py) diff --git a/data_structures/linked_list/singly_linked_list.py b/data_structures/linked_list/singly_linked_list.py index 4377fc280..1f3e03a31 100644 --- a/data_structures/linked_list/singly_linked_list.py +++ b/data_structures/linked_list/singly_linked_list.py @@ -1,9 +1,9 @@ -class Node: # create a Node +class Node: def __init__(self, data): - self.data = data # given data - self.next = None # given next to None + self.data = data + self.next = None - def __repr__(self): # string representation of a Node + def __repr__(self): return f"Node({self.data})"