I was looking at this post:
Python BeautifulSoup: wildcard attribute/id search
in which the answer gives a solution:
dates = soup.findAll("div", {"id" : lambda L: L and L.startswith('date')})
I thought I understood the lambda function in python. However, when I look at this
lambda L: L and L.startswith('date'), I understand that it ultimately returns an id which has a value that contains 'date'. But why is it written as L and L.startswith('date') ? This looks the lambda function is returning a string and a boolean statement.
Can someone explain the logic behind this please ?