how to open files not in current folder python code example Example: open file in python directory path = 'C:\\Users\\Username\\Path\\To\\File' file=open(path, "r")