Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from __future__ import annotations
- from dataclasses import dataclass
- @dataclass
- class ListNode():
- value: str
- next : ListNode
- class List():
- first_node: ListNode
- def insert(self, value) -> ListNode:
- pass
- def append(self, value) -> ListNode:
- pass
- def __str__(self):
- pass
- string_list = List()
- string_list.append('a')
- string_list.append('b')
- string_list.append('c')
- string_list.append('d')
- # -> List(['a','b','c','d'])
- print(string_list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement