python passing variables between classes

python passing variables between classes

let me tell you with a simple example

class A():    var1 = 5;    var2 = “Ferrari”    def init(self):        A.var1 = 4;        A.var2 = “BMW”

class B(A):    def init(self):        print (A.var1)        print (A.var2)

object1 = A() object2 = B()

for more examples

http://stackoverflow.com/questions/19993795/python-how-would-i-access-variables-from-one-class-to-another