a= "pavankumar"
dict = {}
for i in a:
 if i not in dict.keys():
  dict[i]=1
 else:
  dict[i]=dict[i]+1
print dict


b=[1,2,2,3,4,4,5]
dict1 = {}
for j in b:
 if j not in dict1.keys():
  dict1[j]=1
 else :
  dict1[j]=dict1[j]+1
print dict1
d=[]
for key,val in dict1.items():
 if val>1:
  d.append(key)
print d







occ={}
nonoc{}
for k in b:
 if k not in occ.keys():
  occ[k]=1
 else:
  oct[k]=oct[k]+1
  
