How to find the path of the file in python

How to find the path of the file in python?

Do you want to print path of the file , you are working in. Here is the simple code example

__file__

It will print the complete path of the file.

print(__file__)
python print file path
Tony BB
 

TonyBB is a Coach , marketer, hypnotist and a founder of RSKVF Production who specializes in providing simple, affordable, and easy to use solutions for Life.

Click Here to Leave a Comment Below 0 comments

Leave a Reply: