Cod sursa(job #2278829)

Utilizator Code_SniperNetoiu Mihail Code_Sniper Data 8 noiembrie 2018 16:47:49
Problema Text Scor 60
Compilator py Status done
Runda Arhiva de probleme Marime 0.25 kb
with open("text.in") as f:
    text = f.read()

import re
text = re.split(r'[\s\-,.!?]\s*', text)
cuv = len(text)
l = 0
for i in text:
    if i == '':
        cuv -= 1
    l += len(i)

with open("text.out", 'w') as g:
    g.write(str(l // cuv))