---
id: 687e344cc1993f7316af030c
title: Step 5
challengeType: 20
dashedName: step-5
---

# --description--

Inside the `LinkedList` class, add an `__init__` method that sets `self.length` to `0`. This initializes a counter to track how many nodes (elements) are currently in the list.

# --hints--

You should set `self.length` to `0` inside the `__init__` method of the `LinkedList` class.

```js
({ 
    test: () => runPython(`
    ll = LinkedList()
    assert ll.length == 0`) 
})
```

# --seed--

## --seed-contents--

```py
class LinkedList:
    class Node:
        def __init__(self, element):
            self.element = element
            self.next = None

--fcc-editable-region--
    
--fcc-editable-region--
```
