i started learning Python recently and i am facing difficulty converting the below piece of code into a list comprehension:
list = [] #An empty List
for key,value in defaultDict.items():#iterate through the default dict
for i in defaultDict[key]:#iterate through the list in the defaultDict
if i not in list:#If the item in the list is not present in the main list
list.append(i)#append it
Is it possible for me to even do it??Any help with this is much appreciated.