# main.py
import add
b = 2
def init_a():
global a
a = 1
def main():
init_a()
add.show_test()
main()
# add.py
def show_test():
import main
print('a', main.a)
print('b', main.b)
# main.py
import add
b = 2
if __name__ == '__main__':
global a
a = 1
print(a, b)
add.add_test()
# add.py
import main
def add_test():
print(main.a)
print(main.b)
https://v-play.net/