From f7e0d8cb081a955b75c5f6f5fe11d655f00dca5a Mon Sep 17 00:00:00 2001 From: kjg Date: Mon, 1 Jun 2020 23:43:40 +0900 Subject: [PATCH] [Python applying learnings from 1..6] update file(add space) --- kjg/python-the-hard-way/calc.py | 4 ++-- kjg/python.org | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/kjg/python-the-hard-way/calc.py b/kjg/python-the-hard-way/calc.py index 034b098..765e795 100644 --- a/kjg/python-the-hard-way/calc.py +++ b/kjg/python-the-hard-way/calc.py @@ -12,11 +12,11 @@ def input_and_calculate_one_line(): sp_number = number.split(' ') for i in range(len(sp_number) - 1): - txt_result = txt_result + sp_number[i] + '+' + txt_result = txt_result + sp_number[i] + ' + ' sp_number = list(map(int, sp_number)) result = sum(sp_number) - txt_result = txt_result + str(sp_number[-1]) + '=' + str(result) + '\n' + txt_result = txt_result + str(sp_number[-1]) + ' = ' + str(result) + '\n' return txt_result diff --git a/kjg/python.org b/kjg/python.org index 19204ce..4ad8087 100644 --- a/kjg/python.org +++ b/kjg/python.org @@ -133,3 +133,5 @@ How to use Accessing Elements of Lists practice function, while, if **** ex36 some rules of if, loop and tips for debugging +*** Python applying learnings from 1..6 +create calc.py