Zipping Two Lists into Tuples

  • Share this:

Code introduction


This function takes two lists as arguments, uses the zip function to pair elements from both lists, and returns a list of tuples.


Technology Stack : Built-in function zip

Code Type : Function

Code Difficulty : Intermediate


                
                    
def zipped(arg1, arg2):
    return list(zip(arg1, arg2))