According to Python's Methods of File Objects, the simplest way to convert a text file into a list is: with open('file.txt') as f: my_list = list(f) ...
確定! 回上一頁