What does the following code do? read_text = text.read()

Automate Cybersecurity Tasks with Python | Weekly challenge 4 Quiz | 

What does the following code do?

read_text = text.read()
  • Reads the string text and stores it the file read_text
  • Splits the text variable, which contains a string, and stores it as a list in read_text
  • Reads the text variable, which contains a file, and stores it as a string in read_text
  • Replaces the contents of the file read_text with the contents of the file text

 

Leave a Comment