Apart from with open and pandas we can also use csvreader package to read the text files. With csvreader we have got delimiter option to read files having different separators like comma, space, tab "\t", pipe "|" etc. Even you can use your own custom separator as well.