from __future__ import absolute_import
from __future__ import print_function
from __future__ import division


def sum_list_for(num_ls):
    """Sum number list by for loop."""
    _sum = 0
    for num in num_ls:
        _sum += num
    return _sum


def sum_list_recur(num_ls):
    """Sum number list by recursion."""
    if len(num_ls) == 1:
        return num_ls[0]
    else:
        return num_ls[0] + sum_list_recur(num_ls[1:])


def main():
    import time

    num_ls = [0, 1, 2, 3, 4, 5]
    
    start_time = time.time()
    print('By for loop: {}'.format(sum_list_for(num_ls)))
    print('Time: {}'.format(time.time() - start_time))

    start_time = time.time()
    print('By recursion: {}'.format(sum_list_recur(num_ls)))
    print('Time: {}'.format(time.time() - start_time))


if __name__ == '__main__':
    main()

@@ -109,34 +109,35 @@
 %0A%0A%0Adef sum_list_
-fo
+ite
 r(num_ls):%0A    %22
@@ -474,26 +474,18 @@
 s = 
-%5B0, 1, 2, 3, 4, 5%5D
+range(100)
 %0A   
@@ -529,24 +529,25 @@
 int('By 
-for loop
+iteration
 : %7B%7D'.fo
@@ -560,18 +560,19 @@
 um_list_
-fo
+ite
 r(num_ls

Rename to sum_list_iter() and revise main()'s num_ls