Assuming the text file(names.txt) has the data as strings separated by comma
L = list(eval(open(‘names.txt’).readlines()))
what it is doing?
It is inputting the whole file as a single string. It outputs a Tuple.
You can use it by changing slightly according to your input file format.