age is less than 30 in Dictinoary

Create a program that takes a list of dictionaries, where each dictionary contains the name and age of a person. Use lambda functions to filter out all the dictionaries for which the age is less than 30. Then, use a lambda function to print the names of the persons in the sorted list, with the name capitalized and prefixed with "Mr." or "Ms." depending on their gender.
[
    {"name": "John", "age": 25, "gender": "male"},
    {"name": "Emily", "age": 35, "gender": "female"},
    {"name": "Alex", "age": 28, "gender": "male"},
    {"name": "Sarah", "age": 30, "gender": "female"},
    {"name": "Max", "age": 42, "gender": "male"},
]
Total : 0 Discussion
Login