I have to solve this problem like below manner only, As you see in output, The only wrong thing in output I get is, 4 and 5 are count two times, How I can get rid of this, please improvise below code only. do not change the code completely.
n=[1,2,3,4,4,5,5]
i=0
a=0
count=0
while i<len(n):
  a=0
  count=0
  while a<len(n):
    if n[i]==n[a]:
      count=count+1
    a=a+1
  print(n[i],"present",count,"times")
  i=i+1
output:
1 present 1 times
2 present 1 times
3 present 1 times
4 present 2 times
4 present 2 times
5 present 2 times
5 present 2 times
 
     
     
     
     
    