# Online Python compiler (interpreter) to run Python online.
# Write Python 3 code in this online editor and run it.
print("Try programiz.pro")
import multiprocessing
res = []
def calculation(numbers):
print("here")
global res
for n in numbers:
res.append(n*n)
print("inside the process"+str(res))
if __name__ == "___main__":
nums = [1,2,3]
print("dsafa")
p1 = mutltiprocessing.Process(target=calcultation, args=(nums,))
p1.start()
p1.join()
print("outside"+str(res))
IyBPbmxpbmUgUHl0aG9uIGNvbXBpbGVyIChpbnRlcnByZXRlcikgdG8gcnVuIFB5dGhvbiBvbmxpbmUuCiMgV3JpdGUgUHl0aG9uIDMgY29kZSBpbiB0aGlzIG9ubGluZSBlZGl0b3IgYW5kIHJ1biBpdC4KcHJpbnQoIlRyeSBwcm9ncmFtaXoucHJvIikKCmltcG9ydCBtdWx0aXByb2Nlc3NpbmcKCnJlcyA9IFtdCgpkZWYgY2FsY3VsYXRpb24obnVtYmVycyk6CiAgICBwcmludCgiaGVyZSIpCiAgICBnbG9iYWwgcmVzCiAgICBmb3IgbiBpbiBudW1iZXJzOgogICAgICAgIHJlcy5hcHBlbmQobipuKQogICAgcHJpbnQoImluc2lkZSB0aGUgcHJvY2VzcyIrc3RyKHJlcykpCgoKaWYgX19uYW1lX18gPT0gIl9fX21haW5fXyI6CiAgICBudW1zID0gWzEsMiwzXQogICAgcHJpbnQoImRzYWZhIikKICAgIHAxID0gbXV0bHRpcHJvY2Vzc2luZy5Qcm9jZXNzKHRhcmdldD1jYWxjdWx0YXRpb24sIGFyZ3M9KG51bXMsKSkKICAgIHAxLnN0YXJ0KCkKICAgIHAxLmpvaW4oKQogICAgCiAgICBwcmludCgib3V0c2lkZSIrc3RyKHJlcykp