Sure 👍 Here are simple Python examples of map(), filter(), zip(), and regression—useful for interviews and practice.
1. map() Used when you want to apply a function to every element . numbers = [ 1 , 2 , 3 , 4 , 5 ] squares = list ( map ( lambda x : x * x , numbers )) print ( squares ) Output: [1, 4, 9, 16, 25] 2. filter() Used when you want to select elements that satisfy a condition . numbers = [ 1 , 2 , 3 , 4 , 5 , 6 ] even_numbers = list ( filter ( lambda x : x % 2 == 0 , numbers )) print ( even_numbers ) Output: [2, 4, 6] 3. zip() Used to combine two or more iterables element by element . names = [ "Rahul" , "Amit" , "Priya" ] marks = [ 85 , 90 , 95 ] students = list ( zip ( names , marks )) print ( students ) Output: [('Rahul', 85), ('Amit', 90), ('Priya', 95)] You can also create a dictionary: names = [ "Rahul" , "Amit" , "Priya" ] marks = [ 85 , 90 , 95 ] student_marks = dict ( zip ( names , marks )) print ( student_marks ) Output: {'Rahul': 85,...