Re: Error in lambda function..!
On 29/08/2020 08:58, Shivlal Sharma wrote: 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) in () 1 from functools import* 2 nums = [1, 2
Re: Error in lambda function..!
Shivlal Sharma wrote: > 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) in () > 1 from functools import* > 2 nums = [1, 2, 3, 4