import csv
myfile = open ('score sheet.csv','a+')
score = 0
data = score
myfile.write (str(data))
myfile.close
This is a small section of code from a larger program. And in that program I have another csv file that works fine so not sure why this doesnt work
“ close”是一个函数,您需要使用myfile.close()
调用它-注意括号
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.