- Study guides, Class notes & Summaries
Looking for the best study guides, study notes and summaries about ? On this page you'll find 1 study documents about .
1 results
Exam (elaborations)
C859 Python exam test 2022 Questions and Answers(Actual exam questions/frequently tested questions and answers)100% Verified
f1 = open("/my path/my_", "r") - to open and read a file 
f1 = open("/my_path/my_", "w") - to open and write a file (all previous material discarded) 
f1 = open("/my_path/my_", "a") - to open and add to a file 
() - read a file into a string 
("hello!") - writes to a file 
f1. redline) - reads next line 
() - closes a file (must always close a file!) 
with open ("/my file...etc.) as f: - opens, allows work, and automatically closes a fil...