Learn
It’s also common to need to iterate over two lists at once. This is where the built-in zip
function comes in handy.
zip
will create pairs of elements when passed two lists, and will stop at the end of the shorter list.
zip
can handle three or more lists as well!
Instructions
1.
Compare each pair of elements and print the larger of the two.
Take this course for free
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.