mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-03-24 15:39:47 +00:00
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>
This commit is contained in:
parent
2431001658
commit
0e6e5056b3
@ -295,6 +295,7 @@
|
|||||||
* [Add](https://github.com/TheAlgorithms/Python/blob/master/maths/add.py)
|
* [Add](https://github.com/TheAlgorithms/Python/blob/master/maths/add.py)
|
||||||
* [Aliquot Sum](https://github.com/TheAlgorithms/Python/blob/master/maths/aliquot_sum.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)
|
* [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)
|
* [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)
|
* [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)
|
* [Average Mean](https://github.com/TheAlgorithms/Python/blob/master/maths/average_mean.py)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
class Node: # create a Node
|
class Node:
|
||||||
def __init__(self, data):
|
def __init__(self, data):
|
||||||
self.data = data # given data
|
self.data = data
|
||||||
self.next = None # given next to None
|
self.next = None
|
||||||
|
|
||||||
def __repr__(self): # string representation of a Node
|
def __repr__(self):
|
||||||
return f"Node({self.data})"
|
return f"Node({self.data})"
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user