Hi, I am facing an error while solving this question.I went through the solution as well.But even the solution is nnot implementable.

Q3

Write a function which takes list of random integers as an input and returns the list all the unique values present in that list. For ex:

Input: [1, 2, 4, 4, 3, 2, 1, 1, 2, 4, 5, 3]

Output : [1, 2, 3, 4, 5]

Sol:def unique_vals(value):

return list(set(x))

x = [1, 2, 4, 4, 3, 2, 1, 1, 2, 4, 5, 3]

unique_vals(x)

Error:

TypeError Traceback (most recent call last)

in () 1 x = [1, 2, 4, 4, 3, 2, 1, 1, 2, 4, 5, 3] ----> 2 unique_vals(x)

in unique_vals(value) 1 def unique_vals(value): ----> 2 return list(set(x))

TypeError: ‘list’ object is not callable