From 372d5d65493bc117e5cf642cc5e703cfab0a278f Mon Sep 17 00:00:00 2001 From: Santo Cariotti Date: Tue, 2 May 2017 09:17:26 +0200 Subject: Righe del file indefinite --- python/crittografa.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'python') diff --git a/python/crittografa.py b/python/crittografa.py index f853527..f629d13 100644 --- a/python/crittografa.py +++ b/python/crittografa.py @@ -21,8 +21,11 @@ def converti(lettera): else: nuovaParola.append(lettera) +parole = '' + with open('input.txt', 'r') as fin: - parole = fin.read(999999) + for line in fin.readlines(): + parole += line for i in parole: @@ -31,4 +34,4 @@ for i in parole: with open('output.txt', 'w') as fout: for i in nuovaParola: - fout.write(i) \ No newline at end of file + fout.write(i) -- cgit v1.2.3-18-g5258