from functools import* nums = [1, 2, 3, 4, 5, 6, 7, 8, 9] add = reduce(lambda a : a + 1, nums) print(add)
error: -
TypeError Traceback (most recent call last)
<ipython-input-15-684b5d4fac30> in <module>()
1 from functools import*
2 nums = [1, 2, 3, 4, 5, 6, 7, 8, 9]
----> 3 add = reduce(lambda a : a + 1, nums)
4 print(add)
TypeError: <lambda>() takes 1 positional argument but 2 were given
--
https://mail.python.org/mailman/listinfo/python-list
