From 457647462064dc709398a3f97fc47600933991cd Mon Sep 17 00:00:00 2001 From: s45150 Date: Sun, 26 Nov 2017 22:37:25 +0100 Subject: [PATCH] commited tasks --- labs02/task07.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/labs02/task07.py b/labs02/task07.py index ac8ac17..3801b95 100644 --- a/labs02/task07.py +++ b/labs02/task07.py @@ -7,10 +7,8 @@ sumę kodów ASCII znaków. """ def char_sum(text): sumaAsci = 0 - text_tmp = str(text) - text_tmp=text_tmp.replace('[','') - text_tmp = text_tmp.replace(']', '') - text_tmp = text_tmp.replace("'", '') + text_tmp = text + for i in text_tmp: sumaAsci += ord(i) return sumaAsci