Signed up recently but had issues with the confirmation email?
Click Forgot password and follow the reset steps. You can choose the same password you used when you signed up. This should then provide access.
Remember to check Spam and Junk. The email will be from auth@progressbytes.co.uk.
301.15 File Handling Techniques
Practise exam questionsFile Handling Techniques — Note 3 of 4
Append or overwrite content.
Use .write() to save text to a file. Remember to add \n for new lines — write() does not add them automatically. Use "w" to start fresh or "a" to add to existing content.
.write(text) saves text to the file\n explicitly"w" mode creates/overwrites; "a" mode appendsstr() firstscores = [85, 92, 78]
with open("scores.txt", "w") as f:
for s in scores:
f.write(str(s) + "\n")Back to File Handling Techniques
Specification notes for programming are in Paper 2.