python open file at directory code example
Example 1: python get files in directory
from os import listdir
from os.path import isfile, join
onlyfiles = [f for f in listdir(mypath) if isfile(join(mypath, f))]
Example 2: open file in python directory
path = 'C:\\Users\\Username\\Path\\To\\File'
file=open(path, "r")