I would like to write this python dictionnary in just one line. Also, would it be more efficient to write it in just one line or to leave it as I wrote it so far and why ? Here is my code :
def buildDic(df):
dic = {}
hashSet = set(['aa','bb','cc','dd','aa'])
for hashs in hashSet :
dic[hashs]=0
return dic
Thanks