in the second program add:
(program names would help with explanation)
import program_that_asks_question as p1you can then execute functions from the program_that_asks_question, like:
zz = p1.function_name()Rather that using subprocess, you need to control 1st program from second
(program names would help with explanation)