How do I get the head from a linked list in this form


When I learned linked lists the methods were always in class so the head would be self.head. But for this challenge, a library is used and I don’t know how to get the head of the list. Its probably simple but help would be appreciated.

Hi,
So the demo_list is a linked list.
By definition, your point of entry to it will be its head pseudopointer (I say pseudo because python doesn’t work explicitly with pointers). So it will probably something like demo_list.head.

No it wasn’t that but I used your idea of calling it from demo_list directly and figured out demo_list is the first node.i.e demo_list.data == 1 . Its not very intuitive but thanks for your help