Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
from multiprocessing import Process
from multiprocessing import Manager
def a(x):
b=1+2
x[b]=b
if __name__=='__main__':
manager = Manager()
x = manager.dict()
p1 = Process(target=a,args=(x,))
p1.start()
p1.join()
print(x.values())