how to import a class from a file to another python

#from your main script

from folder.file import Klasa

#OR

from folder import file
k = file.Klasa()

#OR

import folder.file as myModule
k = myModule.Klasa()

Here is what the above code is Doing:
1. It’s importing the file module from the folder module.
2. It’s creating an instance of the Klasa class from the file module.
3. It’s importing the file module from the folder module as myModule.
4. It’s creating an instance of the Klasa class from the file module as myModule.