From 94cc2713ed4380cec919e94ac82982424eca794b Mon Sep 17 00:00:00 2001 From: dymik739 Date: Sat, 25 Feb 2023 14:37:39 +0200 Subject: [PATCH] add error correction for broken input formats --- processor.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/processor.py b/processor.py index f515b96..2c86094 100644 --- a/processor.py +++ b/processor.py @@ -9,7 +9,8 @@ raw_stats = [] while True: n = input() if n != "": - raw_stats.append(float(n)) + clear_n = n.replace(",", ".").replace("..", ".") + raw_stats.append(float(clear_n)) else: break