I want know how to pass information from one python program to another. Basically, I will open one python program which uses the os.system(file) command to execute another pytgon program. Let's take an example:
The "Parent" program:
import file #file is the child
import os
num=int(input("Enter number: "))
if num%2==0:
os.system('python file.py')
else:
pass
Now the "Child" program:
name=input("Enter Name: ")
age=int(input("Enter age: "))
print("Hi",name)
So in the example, when the user enters an even number, the program starts up the child program, which in turn will ask the user his name and age.
Now my question is this: If I want to bring back the information (name and age) entered in the child program back to the parent program, how do I do it?