my_list = [1,3,3,8,2,7,8]
max = my_list[0]
for i in range(1,len(my_list)):
if my_list[i] > max:
max = my_list[i]
print('Max number is :', max)
I wrote a code to find a max value in a list and it is working. Now I have to find its(I mean max values') number of repeated times. I have to change this code in order to find its max value and max values' repeated time. Example it will be 8 and 2. But how to do it I do not know. I am stuck with it. Please help me with it.