Is there a one liner code for converting the following list/string to map, basically counting all chars and storing in map.
lst = 'leet'
map ={'l':1,'e':2,'t':1}
what i did so far
for i in lst:
if i not in map:
map[i] = 1
else:
map[i]+=1