Which of the following will remove duplicate elements from a list (O(n)), whilst preserving order?
Correct Answer: mylist = [x for i,x in enumerate(mylist) if x not in mylist[i+1:]]
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Python MCQ Questions