Lambda-Odd
Sat 17 May 2025
title: "Lambda Odd" author: "Raja CSP Raman" date: 2019-04-20 description: "-" type: technical_note draft: false
def is_odd(digit):
if digit % 2 != 0:
return True
return False
digits = [
1, 7, 18, 2, 4, 2, 8, 5, 3
]
digits
[1, 7, 18, 2, 4, 2, 8, 5, 3]
new_list = list(filter(lambda x: is_odd(x) , digits))
new_list
[1, 7, 5, 3]
Score: 5
Category: basics