import re sep = '...' with open("txtfile.txt") as file_in: lines = [] for line in file_in: res = line.split(sep, 1)[0] print(res)
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)