Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def NovaMsg(string):
- x=(string[0:1] + string[3:4]+string[6:7]).isdigit()
- return x
- def conta(caminho):
- tot=0
- caminho = "C:/Users/lucas/Box Sync/CEDERJ/fp python/Whatsapp/input/"+caminho
- with open(caminho, "r", encoding="utf-8") as arquivo:
- for i in arquivo.readlines():
- if NovaMsg(i): tot+=True
- return tot
- total=conta("jacarelog abriljan.txt")
- print(total)
- print(conta("janeiro.txt"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement