You can download this code by clicking the button below.
This code is now available for download.
The function takes two lists as arguments, uses the `zip` function to pair elements from the two lists, and then uses a list comprehension to combine the paired elements into a new list.
Technology Stack : List comprehension, zip function
Code Type : Function
Code Difficulty : Intermediate
def zebra(arg1, arg2):
if isinstance(arg1, list) and isinstance(arg2, list):
return [item for sublist in zip(arg1, arg2) for item in sublist]
else:
return None