I have two modules in the same directory, one has the function in it. I am trying to call the function into my another module, but I am facing AttributeError
module1:
from tank import cal as c
def water():
lev1=c.rec1
lev2=c.rec2
lev3=c.rec3
print(lev1)
print(lev2)
print(lev3)
module2:
from tank import level as lv
a=input("enter the number")
rec1=a[1:5]
rec2=a[5:9]
rec3=a[9:13]
lv.water()
Error:
AttributeError: module 'tank.level' has no attribute 'water'
Directory Structure:
Data
--tank
--__init__.py
--cal.py
--level.py
tankis the package which has both the modulestank.leveland module 2: iscal