2022-11-13 10:39:28 -08:00

10 lines
278 B
Python

#!/usr/bin/env python3
from palindrome_mhartl.phrase import Phrase
with open("phrases.txt") as file:
text = file.read()
for line in text.splitlines(): # Arguably not Pythonic
if Phrase(line).ispalindrome():
print(f"palindrome detected: {line}")