+ 1
file access
I cant pass the Boolean value and the mode value as well, to printed them at my file. P1 = open("logfile.txt", "a+") P1.write(P1.name) P1.write("\nThe file closed is :" + str(P1.closed)) if P1.closed: print("yes") else: print("false") P1.write(P1.mode)
1 Réponse
0
why not convert them to strings first? P1.write(str(P1.mode))