Learn practical skills, build real-world projects, and advance your career
Updated 3 years ago
Python Linked List and Reversing
Now, first of all, what is linked list?
For understanding, it is list of two items in which the second item is the list of next two items and so on until the second item of last linked list is None
.
[item1,
[item1,
[item1, %%[item1, &&[item1, **[item1, None]** ]&& ]%% ]]]
let's suppose the second element be Node. This Node will contain a data (item) and a Node for another data and Node and so on.
Let's create python class object for node.