Log in from a computer to take this course

You'll need to log in from a computer to start Learn Python 2. But you can practice or keep up your coding streak with the Codecademy Go app. Download the app to get started.

apple storegoogle store

Using multiple lists in a function is no different from just using multiple arguments in a function!

a = [1, 2, 3] b = [4, 5, 6] print a + b # prints [1, 2, 3, 4, 5, 6]

The example above is just a reminder of how to concatenate two lists.



Create a function that joins two lists together.

  • On line 5, define a function called join_lists that has two arguments, x and y. They will both be lists.
  • Inside that function, return the result of concatenating x and y together.

Take this course for free

Mini Info Outline Icon
By signing up for Codecademy, you agree to Codecademy's Terms of Service & Privacy Policy.

Or sign up using:

Already have an account?