Import function from other file
Assuming we have a file named my_module.py
that contains a function named my_function
:
We can import this function into another file using the import
statement. Here's an example:
Import function from sub directory
Import function from other directory
Last updated