Lambda Assignement - Part 1
Lambda Assignement - Part 1
Answer method 1 - 22
Answer method 2 - 22
Answer method 1 - 14
Answer method 1 - 14
20
True
12 is number
Original arrays:
[1, 2, 3, 4, 5, 6, 7]
[4, 5, 6]
Intersection of the said arrays: [4, 5, 6]
Original arrays:
[1, 2, 3]
[1, 1, 1]
Result: after adding two list [2, 3, 4]
Orginal list: [19, 65, 57, 39, 152, 639, 121, 44, 90, 190]
Numbers of the above list divisible by nineteen or thirteen: [19, 65, 57, 39, 152,
190]
s = lambda string:string==string[::-1]
print("List of palindromes: ", list(filter(s,list1)))
Orginal list: [2, 4, -6, -9, 11, -12, 14, -5, 17]
Sum of the positive numbers: 48
Sum of the negative numbers: -32
Original lists: ['Red', 'Green', 'Blue', 'White', 'Black'] Reverse strings of the said given list:
['deR', 'neerG', 'eulB', 'etihW', 'kcalB']
Valid string
Orginal list: [1, 'abcd', 3.12, 1.2, 4, 'xyz', 5, 'pqr', 7, -5, -12.22]
Number of floats in the said mixed list: 3