# invalid for el in s: if str1Ht[el] == None: str1Ht[el] = 1 pass str1Ht[el] += 1
# valid for el in s: if el not in str1Ht: str1Ht[el] = 1 pass str1Ht[el] += 1