for i in range(1, 51):
with open(str(i) + "park.txt", "w", encoding=:"utf8") as report_files:
report_files.write("-{0} Weekly Report-".format(i))
report_files.write("\nJob: ")
report_files.write("\nName: ")
report_files.write("\nDo: ")
Weekly Report File Creation Program for Week 50.
I'm sure there's no problem with grammar
fori in range(1,51):
indicates the
detection error
Is there a problem with the code? Is it a program setting problem?
python
There is a typo on the second line.
Replace encoding=:"utf8"
with encoding="utf8"
and run.
© 2024 OneMinuteCode. All rights reserved.