Q1: In the app, we imported functions.py from main.py. Is it possible to import main.py from functions.py?

A: Yes, that is technically possible. You can do import main in functions.py. However, that import doesn't make much sense. We usually import the backend to the frontend. The backend is the script where the processing is done (i.e., reading and writing the to-do files), and the frontend is the code that constructs the user interface (i.e., the command line).

Q2: Can we import more than one .py file from the main.py file?

A: Yes, that is possible, and as the program expands, it is recommended to create more backend files, and you can import all those files from main.py. For example, you might want to create some functions which send out the to-do items by email to your email address. You might also want to create some functions that produce a PDF with the to-do items inside. It is recommended to write the email and the PDF functions in separate modules and then import those modules from the main module. For example, if we had these files:

main.py

functions.py

pdf.py

email.py

In main.py we would have these lines:

import functions
import pdf
import email