PCEP • Practice Test 21
Free PCEP practice test — 15 questions with explanations. Set 21. No signup required.
A Python script uses the following code to open a file: f = open('data.txt', 'w'). The programmer then writes multiple lines to the file. After writing, which of the following is the BEST practice to ensure data integrity?