Instead of calling a variable , the whole method is being called. Is there something I need to change to call only the variable 'add'?
I just want to use the variable 'add' to module3. tia
module2.py
I just want to use the variable 'add' to module3. tia
module2.py
def meth22(): # self.add = add add = input('What plan do you want to add?\n') return add #addmodule3.py
import pickle from module2 import cmod2 plannerlist = [] class cmod3: def meth31(): planner = [] add = cmod2.meth22() planner.append(add) plannerlist.append(planner) pickle.dump(plannerlist, open('pl','wb')) print('Your plan:') for planner in plannerlist: print(*planner) return planner #return plannerlist # print(pl) #show