Create Two Directories (Exercise)
00:00 Here is way more text on the slide than the former exercise, so it’s a bit more work to do for you
00:07
in your kernel application. Navigate to your desktop and create a new folder named pip_exercises
. Then change into the newly created folder and print your current working directory.
00:21
After that, navigate back to the desktop folder and create another folder named other_exercises
. So the other_exercises
folder should be next to the pip_exercises
folder.
00:35 Verify that both folders exist by listing the items on your desktop.

Bartosz Zaczyński RP Team on March 31, 2025
@kishore.99v There’s an error in your import statement:
-import pathlib as Path
+from pathlib import Path
When you import the Path
class correctly, you’ll be able to call its .home()
method:
>>> from pathlib import Path
>>> Path.home()
PosixPath('/home/realpython')
Become a Member to join the conversation.
kishore.99v on March 30, 2025
Why I am seeing this error below if I wanted to get the home directory?