I wrote a Python code with the os module:
import os
os.system("python")
When I run this code in PowerShell/command prompt, it will open the python interpreter in PowerShell/command prompt.
Now I want to extend the code which will automatically write the next lines of code in that python interpreter itself (which is opened in the PowerShell already).
For example:-
The above code opened this in the PowerShell.
Now I want to exit the Python interpreter (This is for example) in this PowerShell window with python's inbuilt function exit()
.
Thanks!