Challenge: Appending an Element to a List

Test yourself and implement what you have learned so far in this challenge.

Problem Statement

You are given a list of elements and you have to append an element to the list which is equivalent to the first element of the same list.


The input is the List list to which you need to append an element.

list has already been declared for you.


The output will be finalList.

Sample Input


Sample Output


Test Yourself

Write your code in the given area. Try the exercise by yourself first, but if you get stuck, the solution has been provided. Good luck!

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy