0

How can I print the folder name of my python script?

Let us say I entered this in the terminal:

python sample-folder/script.py

I looking for a code that will print 'sample-folder'

P.S.

I can't seem to return this using the os library

Dean Christian Armada
  • 5,837
  • 7
  • 55
  • 103

0 Answers0