Automate Cybersecurity Tasks with Python | Weekly challenge 4 Quiz |
You’ve read a log file into the variable file_text. The file_text variable contains a string of 50 usernames of employees at your company. In order to pass it into a function that checks the login count of each user, the string should be divided into a list of separate usernames. How do you convert this string into a list and store it in a variable usernames?
- usernames = split(usernames, file_text)
- file_text.split() as usernames
- usernames = file_text.split()
- usernames = usernames.split(file_text)