You are viewing a single comment's thread. Return to all comments →
d = {} for i in stringList: if d.get(i): d[i]+=1 else: d[i] = 1 res = [] for i in queries: try : res.append(d[i]) except: res.append(0) return res
Seems like cookies are disabled on this browser, please enable them to open this website
Sparse Arrays
You are viewing a single comment's thread. Return to all comments →