python set current direcftory code example
Example 1: python get current file location
import os
os.path.dirname(os.path.abspath(__file__))
Example 2: get the previous working directory in python
path = os.path.dirname(__file__)
print(path)
import os
os.path.dirname(os.path.abspath(__file__))
path = os.path.dirname(__file__)
print(path)