summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorSanto Cariotti <sancn@live.com>2017-05-02 09:17:26 +0200
committerSanto Cariotti <sancn@live.com>2017-05-02 09:17:26 +0200
commit372d5d65493bc117e5cf642cc5e703cfab0a278f (patch)
treefd036c07897007b0b1bcfd2f5cbbd933809eb109 /python
parent0529cbf6f276b769022c0cd50b006b8de99c9383 (diff)
Righe del file indefinite
Diffstat (limited to 'python')
-rw-r--r--python/crittografa.py7
1 files changed, 5 insertions, 2 deletions
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)