def unique(list1)
Closed this issue · 0 comments
i-arun-samui commented
Hi,
What is the purpose of this function :
def unique(list1):
unique_list = []
for x in list1:
if x not in unique_list:
unique_list.append(x)
return x
since unique_list is empty when called it return the first value of list1
is this case unique(list1) is equal to list1[0]
Thank you for explaining this.
Regards