第一种:使用extend() >>> lines = open('test.txt').readlines() >>> lines ['1\n', '2\n', '3\n', '4,5\n'] >>> for line in lines: ... ll.extend(line.strip().split(',')) ... >>> ll ['1', '2', '3', '4', '5'] 第二种:使用+ >>> ll = [] >>> lines = open('test.txt').readlines() >>> lines ['1\n', '2\n', '3\n', '4,5\n']