How to Change the Current Directory

Asked 2 years ago, Updated 2 years ago, 36 views

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?

python python3

2022-09-30 13:47

1 Answers

I can't.

Even if it can be done in any way, I don't think it's a common method.


2022-09-30 13:47

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.