Here is my code in the main file:
from File2.Test import test
test()
And here is the code for the file containing the class:
class Test:
def test(self):
print('Test')
As you can see, I don't just want to import the class, I want to import something from the class. When I try the syntax above, I get this error: ModuleNotFoundError: No module named 'File2.Test'; 'File2' is not a package. If there is anyway to just import test() from File2, please let me know. Any help would be appreciated!