Comment Comment by saadq Not really a fan of the lambda syntax in Python. Comparison:JavaScript: let arr = [1, 2, 3] let sumOfSquares = arr.map(n => n * n).reduce((a, b) => a + b) // 14 Python: arr = [1, 2, 3] sum_of_squares = reduce(lambda a, b: a + b, map(lambda n: n * n, arr)) # 14 parent saadq 10 years ago
JavaScript:
Python: