January 2019
Beginner
318 pages
8h 23m
English
To start working with directories, first, we will get the name of our current working directory. The os module has a getcwd() function, using which we can get the current working directory. Start the python3 console and enter the following commands to get the directory name:
$ python3Python 3.6.5 (default, Apr 1 2018, 05:46:30) [GCC 7.3.0] on linuxType "help", "copyright", "credits" or "license" for more information.>>> import os>>> os.getcwd()'/home/student'>>
Read now
Unlock full access