0

Fill in the blank1 with statement to write "abc" in the file "mydata"

f1=open("mydata","a") _________ #blank1 f1.close() mydata.write(abc). Is this correct?

13th Aug 2020, 3:57 AM
Model Pilot
Model Pilot - avatar
2 Respuestas
+ 2
"mydata" is the file name, not the variable name in the program. And if you want to write a string into a file, you'll need to quote this string...
13th Aug 2020, 4:12 AM
Sandra Meyer
Sandra Meyer - avatar
0
f1.write("abc")
13th Aug 2020, 5:13 AM
Namit Jain
Namit Jain - avatar