Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import re
- f=open("weather.txt", mode="r", encoding="utf8")
- content=f.read()
- f.close()
- pattern=re.compile("[Α-Ω]*[α-ω]*[ϊϋ]*[άέήίόύώϊϋ]+[α-ω]*") # <-- Εδώ βάζουμε το RE
- result=pattern.findall(content)
- print(result)
- print(len(result))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement