We are having some issue here. There are two python files parent and child in same folder. I want to reuse the function("sum") of parent in child, instead of copying the same function("sum") into child. Please refer the image below.
child.py
def add(a,b):
sum(a,b)
parent.py
import child
def sum(a,b):
print(a+b)
def main():
child.add(1,2) # Prints 3
child.pyneedsparent.pyand vice-versa.