Interview Question

Senior Data Scientist Interview

-

Meta

Given a list, create a new list that does not include the duplicates of the original list.

AnswerAdd Tags

Interview Answers

3 Answers

0

a = old list b = new list code : a = set(a) b = list(a)

Anonymous on

0

Maybe they were asking to do it in-place. In that case, switch the duplicate elements to the end.

Andre on

0

python 4 lines of code.

Anonymous on

Add Answers or Comments

To comment on this, Sign In or Sign Up.