Q:

Write a Python program to remove duplicates from a list of lists

0

Write a Python program to remove duplicates from a list of lists.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

import itertools
num = [[10, 20], [40], [30, 56, 25], [10, 20], [33], [40]]
print("Original List", num)
num.sort()
new_num = list(num for num,_ in itertools.groupby(num))
print("New List", new_num)

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now