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
  • 6,724
  • 9
  • 67
  • 116

0 Answers0