# -*- coding:utf-8 -*- classSolution: # 返回[a,b] 其中ab是出现一次的两个数字 defFindNumsAppearOnce(self, array): # write code here d = dict.fromkeys(array,0) for i in range(0, len(array)): d[array[i]] = d[array[i]] + 1 result = [] for key in d: if d[key] == 1: result.append(key) return result