Skip to content

Tag: list

Finding unique elements from the list of given numbers

I have written a code which finds unique elements from the list of integers. if my given input array is [1,2,2,3,4] where n = 5 i get the output as 1,2,3,4,None but i want the output to be 1,2,3,4 can anyone tell how to fix this ? Answer Your function Distinct has no return statement so it will always return