Python: Garis terpisah termasuk periode atau tanda excalamtion dan mencetaknya ke prompt ..
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