- 1

I am opening a file in python program it opens very well but if I trys to open that in another big program it showsnofileexsist

"""I am using pydroid3""" f=open("n1.txt") print (f.read()) f.close() g=open("n2.txt") print (g.read()) g.close() h=open("n3.txt") print (h.read()) h.close() i=open("n4.txt") print (i.read()) i.close() j=open("n5.txt") print (j.read()) j.close() """This code doesn't shows me error but the next one shows file doesn't exist""" n=int(input()) a=0 while(a!=n): a=a+1 print("*"*a) f=open("n1.txt") print (f.read()) f.close() g=open("n2.txt") print (g.read()) g.close() h=open("n3.txt") print (h.read()) h.close() i=open("n4.txt") print (i.read()) i.close() j=open("n5.txt") print (j.read()) j.close() """This code shows no file file exists.""" """Pls anyone solve it I am just a beginner"""

26th Jun 2020, 3:08 AM
ALL IN ONE GYAN
ALL IN ONE GYAN - avatar
1 Antwort
0
are you sure your files and your .py are in the same folder ?
28th Jun 2020, 6:29 PM
~kyros~
~kyros~ - avatar