Python: séparer les lignes, y compris la période de période ou d'excalamtion et l'imprimez à l'invite.

with open("file.txt") as f:
    out = []
    for line in f:
        for word in line.split():
            out.append(word)
            if word.endswith(('.', '!')):
                print(' '.join(out)+'\n')
                out.clear()
Lazy Lizard