23 lines
300 B
Markdown
23 lines
300 B
Markdown
## Stack
|
|
Stack Class
|
|
Die `Stack`-Datenstruktur, die wir erstellen werden, wird **nur Ganzzahlen** speichern
|
|
### Python
|
|
#### main.py
|
|
|
|
```python
|
|
from stack import Stack
|
|
|
|
stack = Stack()
|
|
print(len(stack.elements))
|
|
```
|
|
|
|
#### stack.py
|
|
|
|
```python
|
|
class Stack:
|
|
|
|
def __init__(self):
|
|
|
|
self.elements = []
|
|
```
|