[Solved] split a line and print in second line [closed]
with open(‘path/to/input’) as infile: for line in infile: if line.startswith(“@”): line = line.strip() print(line) print(line.rsplit(“#”, 1)[1]) elif any(line.startswith(e) for e in “#+”): print(line.strip()) solved split a line and print in second line [closed]