Here's a file named "importable" where I try to import the method test function.
class SoonImported:
def __init__(self, x):
self.x = x
def methodTest(self):
print(self.x)
In another file I have this line of code that cannot be changed (because my example is based on a homework).
from importable import SoonImported, methodTest
When I try to run this script it gives me an Import error and says that it "cannot import name 'methodtest'". How should I correct the soonImported class in order to make it work?
Thanks for your help.