Learning Python for Forensics
上QQ阅读APP看书,第一时间看更新

Modifying the print_output() function

This function is identical to the previous iteration, with the exception of the addition of the newline character \n on line 101. This helps separate entries in the console's output with an extra space. When iterating through the code, we will find that not all functions need updating to improve the user experience, accuracy, or efficiency of the code. Only by modifying an existing function will some sort of benefit be achieved:

093 def print_output(usb_name, usb_date):
094 """
095 Print the information discovered
096 :param usb_name: String USB Name to print
097 :param usb_date: String USB Date to print
098 :return: None
099 """
100 print('Device: {}'.format(usb_name))
101 print('First Install: {}\n'.format(usb_date))