Read File using Relative Path
file_name = "..//..//data//data//test.txt"
This code will move 2 back folder then look for
data//data/text.txt file.
This way you can navigate to relative folder
while reading any file in python.
file_name = "..//..//data//data//test.txt"
This code will move 2 back folder then look for
data//data/text.txt file.
This way you can navigate to relative folder
while reading any file in python.
Comments
Post a Comment