I need to share a variable between 2 classes that are called in the main file. in the following replicable code, variable sharedVar is defined in main file and passed to both class child1 and child 2. I am expecting the variable to be equal to 2 in child2 since it has been changed from 1 to 2 in child1. but it still prints it as 1.

file mainClass:

```
from class1 import Class1
from class2 import Class2

class mainClass():
    sharedVar = 1
    my_child1 = Class1(sharedVar)  # expecting to print 1
    my_child2 = Class2(sharedVar)  # expecting to print 2

```

file class1

```
class Class1():
    def __init__(self,sharedVar):
        sharedVar += 1
        print("Class1",sharedVar) # output is 2

```

file class2

```
class Class2():
    def __init__(self,sharedVar):
        print("Class2",sharedVar) # output is 1 but expected to be 2

```

Note: These classes are in 3 separate files, so defining a global variable outside the classes will not work!

If you have an answer, please be specific and provide the code. writing an explanation without codes is not going to help me nor the future readers of this question.