diff --git a/python-temel/return.4.py b/python-temel/return.4.py new file mode 100644 index 0000000..ecd28fa --- /dev/null +++ b/python-temel/return.4.py @@ -0,0 +1,11 @@ +def gettotal(l): + total = 0 + for i in l: + total += i + return total + +result = gettotal([1, 2, 3, 4, 5]) +print(result) + +result = gettotal(range(10)) +print(result)