Hello, this is my first time to ask you a question.
I am a beginner, so I would appreciate it if you could teach me.
importos
os.getcwd()
Now you know the current directory
C:\\Users\\○○\\Documents\\surasura-python\\chapter05
appears.So I'm going to change this current directory.
os.chdir('C:\\Users\\○○\\Documents\\surasura-python\\')
I was able to type quit()
to close the interactive shell
C:\\Users\\○○\\Documents\\surasura-python\\chapter05
.
How can I leave the changes unchanged?
I can't.
Even if it can be done in any way, I don't think it's a common method.
© 2024 OneMinuteCode. All rights reserved.