Contact: aviboots(AT)netvision.net.il
39,892 questions
51,823 answers
573 users
from itertools import * def f(a, b): print("a =", a, "b =",b) print() return a + b print(list(accumulate('abcd', f))) ''' run: a = a b = b a = ab b = c a = abc b = d ['a', 'ab', 'abc', 'abcd'] '''