You want to check if a device is running a particular operating system that needs updates. Devices that contain a substring of “i71” in their device ID are running this operating system. First, you want to read in a log file that contains the device ID for all devices and convert it into a string. You should then parse this string into a devices list. Then, you should separate all device IDs that contain the substring “i71” into a separate list called updates_list. If you want to automate this through Python, what would be part of your code? Select three answers.

Automate Cybersecurity Tasks with Python | Weekly challenge 4 Quiz | 

You want to check if a device is running a particular operating system that needs updates. Devices that contain a substring of “i71” in their device ID are running this operating system. First, you want to read in a log file that contains the device ID for all devices and convert it into a string. You should then parse this string into a devices list. Then, you should separate all device IDs that contain the substring “i71” into a separate list called updates_list. If you want to automate this through Python, what would be part of your code? Select three answers.

  • A for loop to iterate through all items in the devices list
  • A counter variable to keep track of the number of devices containing the substring “i71”
  • An if statement that checks if elements in devices contain the substring “i71”
  • A split() function to split the string containing the information in the log file into a devices list

 

Leave a Comment