Question: 12345 def status_logger (log_filename, new message): [Select] current time (1) (2) str(datetime.now()) Imagine you're writing a function to allow your program to log status updates

12345 def status_logger (log_filename, new message): [Select] current time (1) (2) str(datetime.now()) Imagine you're writing a function to allow your program to log status updates to some external file. When called, the function would open the log file (whose filename is given by log_filename, then add a new line to the end of the file. The new line should have the current time followed by the log message (represented by new_message, separated by a tab. You may assume that current_time holds the string representing the current time once line 2 is called. Which of the following lines could fill in (1) above? You may assume all indentation is correct. [Select] log_file.close() Which of the following lines could fill in (2) above? You may assume all indentation is correct

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!