demo_file_open_d.py:
f = open("D:\\myfiles\welcome.txt", "r") print(f.read())
C:\Users\My Name>python demo_file_open_d.py
Welcome to this text file!
This file is located in a folder named "myfiles", on the D drive.
Good Luck!