+ 8
What's wrong with this code ? đ
I wrote this code as my first try to make my first files rewrite function đ and it tells me in line 9 the name 'project' is not defined đ so how can I define it ? đ here's the code : def file_rewrite(filename): file = open(filename,"w") file.write("hello") file.close() myfile = open("project.txt","w") myfile.close() print(file_rewrite(project.txt)) file_opening = open("project.txt","r")
4 Respostas
+ 12
Missing " " ?
+ 11
Tashi is right. You're missing the quotes in filename argument.
+ 7
thank you all for replying I thought it didn't need the quotes cause it's a function đ
+ 1
i think there is missing quotes " "