get path and name of file for open()

40

import os
f = open('file.txt')
file_path = os.path.realpath(f.name)

Comments

Submit
0 Comments