I have a problem related to accessing objects created using one class from an another class
In order simplify the problem lets say ,
I Have a Python Files called Box1.py , cart1.py and soldApples.py
class Box1:
def__init__(self):
self.appleList = []
def set_Apples(self,number1):
self.appleList.append(number1):
def get_Apples(self):
return appleList
And the Main Class Called Cart1.py
from Box1 import Box1
NewSet = Box1()
class cart1:
def calculation()
numberofApples = 5
NewSet.set_Apples(numberofApples)
return 0
Now I want to Access Object "NewSet" using another class
let's say soldApples.py
so How do I access to "NewSet" Object Created by Cart1.py using soldApples.py?
Thank you very much in advance guys.
import Cart1Cart1.NewSet