There is some application, let's say ConsoleApplication.exe. When it starts, it offers to enter some value, and in response it displays something else.
It is necessary for the program to do all this in a loop, that is, for the program to launch the application itself, insert some phrase, and write the result to some file.
I tried to run the application through os.system , but it is not clear how to substitute an argument and simulate a carriage return.
An example of what happens in the console when the application starts:
ΠΠ²Π΅Π΄ΠΈΡΠ΅ ΠΊΠ»ΡΡ: //Π·Π΄Π΅ΡΡ_Π²Π²ΠΎΠΆΡ_ΠΊΠ»ΡΡ ΠΊΠ°ΠΊΠΎΠΉ_ΡΠΎ_ΠΎΡΠ²Π΅Ρ How can this algorithm be implemented?