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_liststhat has two arguments,
y. They will both be lists.
- Inside that function,
returnthe result of concatenating
Take this course for free