educative.io

About importing Node

Hi, I am reading : Ace the Python coding interview/ Singly Linked List Insertion, in the Python data structures course.
In the LinkedList.py code you start with: " from Node import Node ", but my code is not working because: import “Node” could not be resolved. Of course I looked it up in the internet but nothing about a Node module or something. Can you explain is that for python 2? or JS? or what to do. I am using Python 3.10.4.

Thanks


Course: Educative: Interactive Courses for Software Developers
Lesson: Educative: Interactive Courses for Software Developers

Hi @Rolando_Garzon

In the code from Node import Node, we import a node from Node class which is separately implemented. So you also need to implement the Node class before importing.

Hope it will help, Happy Learning :slight_smile: