DEV Community

fernandocavill
fernandocavill

Posted on

The different syntax of import packages between python and Nodejs

In the ES6 and Nodejs, we import packages like

import default_package_name from "module-name";
Enter fullscreen mode Exit fullscreen mode

However, it is total opposite in python, the from keyword is at beginning

from package_name import module_name
Enter fullscreen mode Exit fullscreen mode

why the two syntax are so similar but the order is completely difference.

Top comments (0)