What does the following code do? logins = “pwashing jhill tshah”

Automate Cybersecurity Tasks with Python | Weekly challenge 4 Quiz | 

What does the following code do?

logins = "pwashing jhill tshah"
usernames = logins.split()
  • Splits a string variable called logins into single characters
  • Removes the blank spaces that split the usernames in the variable logins and stores the string in the variable usernames
  • Removes the last username in the logins variable and stores the string in the usernames variable
  • Splits a string variable called logins into a list of strings and stores it in the variable usernames

 

Leave a Comment