Find the current directory and file’s directory [duplicate]

In Python, what commands can I use to find:

  1. the current directory (where I was in the terminal when I ran the Python script), and
  2. where the file I am executing is?

1
13

Leave a Comment