Python is the one language that has taken the world by storm! There is no denying in that, there are multiple organizations across the world choosing Python over other data analytics languages. When I started working on Python, like any other start, there were multiple mistakes that I made, and in this post, will be sharing some of them with you !
os – This module is one of the most important modules in Python. This is the module that allows you to interact with the operating system. So, for all the commands like changing directories, or file operations require us to import this module.
When I was working in Python, I was working with the Windows system, in anaconda. Now, there are the following two commands required when working with directories using the os command.

os.getcwd() -> This command gives us the details of the current working directory. So, if there is a file that you create, it gets created here.
os.chdir() – Now, this was the command that gave me the error!
os.chdir(“C:\\avantika.joshi\\”) -> When doing this, you are more likely to get error, because python is not able to recognize the “.” in the path. To ignore this, one has to do the following ->
os.chdir(r”C:\\avantika.joshi\\”) -> When we use the r it ignores, any of the special characters. So, if you are getting any EOL error when changing the path, try using the amazing r filter.
Happy Learning 🙂

Leave a comment