Extend List

The task is to create a function named extend_list that accepts a list and an arbitrary number of additional elements. This function should add these additional elements to the end of the provided list.
The first line of the input contains space-separated integers representing the initial list. The second line of the input contains space-separated integers representing the elements that need to be added to the initial list.
The program should print the resulting list.
Input
Output
1 2 3 4 5 6
[1, 2, 3, 4, 5, 6]
 

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue