Ask Question
12 August, 08:02

Write a statement that takes a variable named text_file that contains a file object and reads its contents into a Python list of lines. Store the resulting list into a variable named file_contents.

+5
Answers (1)
  1. 12 August, 08:30
    0
    contents = list (open_file. readlines ())

    Explanation:

    contents = list (open_file. readlines ()) is a statement that takes a variable named text_file that contains a file object and reads its contents into a Python list of lines.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Write a statement that takes a variable named text_file that contains a file object and reads its contents into a Python list of lines. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers