I have 2 python programs namely a1.py, a2.py
I want to import a1.py in a2.py.
Here are the sample codes: a1.py:
class a:
    def __init__(self):
        #code
    def __str__(self):
        #code
    def f1(self):
        #code
    def f2(self,file):
        #code to read a file
          and call f1 to do operations
        #returns final text as str 
m = a()
m.f2("file")
a2.py
class b:
    def __init__(self):
        #code
    def __str__(self)
        #code
    def f3(self,text) #this text is the output of a1.py
        #code
    def f4(self)
        #code gives the final output as list and calls f3
n = b()
n.f4()
How can I use the output of a1.py in a2.py?
 
     
     
    