+ 1
File not opening
#py3 #file is in my D: Drive password_file= open("jyyk.txt", 'r') passw= password_file.read(2) print(passw) password_file.close() #File location- D:\shaurya #Coding on website not on IDE
6 Answers
+ 1
i faced the same problem when i was a beginner, this is thw problem of code editor, open the complete folder of your project in your code editor and type.
passfile = open (filename , 'r' , encoding= 'UTF-8' , errors='ignore')
+ 1
Means should I use an IDE and provide it the complete path to my file @Saad Khan
0
Give the absolute path to the file otherwise run python in same folder
0
@Gayashan Pananwla , Given the required info
0
yup! use VS code, install it after watching tutorial from YouTube, because if you forgot to add VS code to file explorer, you wight encounter the same problem
0
Thanks