摘要:
>>> s='alex egon alex yuyang yuyang yuyang' >>> s_ls = s.split() >>> s_ls ['alex', 'egon', 'alex', 'yuyang', 'yuyang', 'yuyang'] >>> dic = {} >>> for i in s_ls: if i not in dic: dic[i]=1 ... 阅读全文
摘要:
First, let me reiterate the main points in Alex’s post: The default implementation is useless (it’s hard to think of one which wouldn’t be, but yeah) 阅读全文