結果 : check if key in dictionary python time complexity