EXL Service Interview Question

remove duplicate list values in python ? s = [10,20,30,20,10,40,50]

Interview Answers

Anonymous

Sep 5, 2024

s = [10,20,30,20,10,40,50] p = [] for new in s: if new not in p: p.append(new) print(p)

Anonymous

Sep 24, 2024

Bro it's more easy s = [10,20,30,20,10,40,50] s = list(set(s)) print(s)