<AptiCode/>

Question 484: How can you read the entire contents of a file named "data.txt" into a string?

tcs
wipro
infosys
general
aptitude
reading-and-writing-files
python-programming

Using theread()method on the file object reads the entire contents of the file into a string.