text = """first second third""" for i, line in enumerate(text.splitlines(), start=1): print(i, line)
splitlines and multiline strings