For this Question: Given a singly linked list and an element K, your task is to insert the element at the tail of the linked list.<b>User Task:</b>
Since this will be a functional problem, you don't have to take input. You just have to complete the function <b>addElement()</b> that takes head node and the integer K as a parameter.

Constraints:
1 <=N<= 1000
1 <=K, value<= 1000Return the head of the modified linked listSample Input:-
5 2
1 2 3 4 5 

Sample Output:
1 2 3 4 5 2
, I have written this Solution Code: a,b=[int(x) for x in input().split()]
c=[int(x) for x in input().split()]
for i in c:
    print(i,end=" ")
print(b), In this Programming Language: Python, Now tell me if this Code is compilable or not?