Jan-31-2019, 04:38 PM (This post was last modified: Jan-31-2019, 05:31 PM by Larz60+.)
I could manage to write the file. but cant do read the file. Please help me. Here is the code:
def write():
try:
dataFile = open("temp1.txt", "w")
i = 1
while (i <= 6):
print i
dataFile.write("%s\n" % i)
i+=1
dataFile.close()
except IOError:
print "Could not open the file