Question: how to convert text file into list?
Answer: Use str. split() to convert each line in a text file into a list. Use open(file, mode) with file as the pathname of the file and mode as "r" to open the file for reading. Create a for-loop to iterate through each line of the file.