<jupyter_start><jupyter_text>Anonymous Lambda Functions  map()                 This takes a lamda function and list as an argument and returns new list     eg : new_var =  map(lambda x : x *10, new_var) reduce()This takes a lambda function and list as argument and this execute repetative operation over the peer of list         eg: new_var = reduce(lambda x, y:x*y, var) filter()             This takes a lamda function and list as an argument and you can make expression directly in the function( no need to declare    conditional statements)               eg : new_var = filter(lamda x: x%2 != 0, new_var)<jupyter_code>def func():
    x = lambda x: x*5
    print(x(20))
func()
# this is another way
def func():
    x = (lambda x, y: x*y)(20,10) ## here i passed two arguments in a single line 
    print(x)
func()
## small example to calculate perimeter of rectangle

def func():
    rec = (lambda l, w : 2 * (l+w)) (20*2,10*2)
    print(rec)
func()
## Other example
def func(a,b):
    return lambda y : y*a*b

result = func(10,10)
print(result(3))
## using a map function multiplying list values 10 times
def func():
    list = [20, 30, 40, 50]
    list = map(lambda x: x*10, list)
    for i in list:
        print(i)
func()
## using multiple lists
numbers_list_1 = [1, 2, 3, 4, 5]
numbers_list_2 = [6, 7, 8, 9, 10]

def func():
    square_numbers = list(map(lambda x,y: x*y, numbers_list_1, numbers_list_2))

    print(square_numbers)
func()
## Printing odd numbers in list using filter
def func():
    list = [20,29, 30,39, 40,49, 50,59]
    list = filter(lambda x: x%2!=0, list)
    for i in list:
        print(i)
func()
## Multiplying all numbers in list using reduce
from functools import reduce
def func():
    list = [1,2,3,4,5]
    result = reduce(lambda x,y: x*y, list)
    print(result)
func()
## Printing maximum element from the list
def func():
    list = [1,2,3,4,5]
    result = reduce(lambda a, b: a if a > b else b, list)
    print(result)
func()<jupyter_output>120
5
{'fraction_non_alphanumeric': 0.12066365007541478, 'fraction_numerical': 0.04122674710910005, 'mean_word_length': 3.2980561555075596, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '519995', 'license': 'MIT', 'n_tokens_mistral': 727, 'n_tokens_neox': 671, 'n_words': 264, 'path': '04...learn_python.ipynb', 'repo_name': 'ram574/Python-Learning', 'size': '1989'}