Nov-07-2022, 04:26 AM
The function is only called if the file (Maryland Case Search.csv) does not exist (the if branch; line 4). In that case, it is created at line 2 of the function (which simply creates an empty file); the rest of the function then creates the csv header, opens said file then writes the header, after which the file is auto closed.
I assume that the rest of the code (not shown) goes on to use the returned file handler.
I assume that the rest of the code (not shown) goes on to use the returned file handler.
Sig:
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein
>>> import this
The UNIX philosophy: "Do one thing, and do it well."
"The danger of computers becoming like humans is not as great as the danger of humans becoming like computers." :~ Konrad Zuse
"Everything should be made as simple as possible, but not simpler." :~ Albert Einstein