What is the output of `list(zip([1,2,3], [4,5]))`?

Python Professional Hard

Python Professional — Hard

What is the output of `list(zip([1,2,3], [4,5]))`?

Key points

  • Zip function pairs corresponding elements from two lists
  • Shorter list determines the length of the output
  • Output is a list of tuples
  • Missing elements in the longer list are not included in the output

Ready to go further?

Related questions