For example: How can I write this function in lambda form?
a=1 #Example
def Number(a):
try:
float(a)
bool_a = True
except:
bool_a = False
return bool_a
I want the lambda function to be used with the map function on a list and check if the input is a number or not and add boolean values to another list.
L=[1,2,3,4,5,'','Example']
L2=list(map(Number,L)) #I want the Number function here to be in lambda form
print(L2)