Program to print the multiple occurrence of numbers in a list I wrote this program to print how many times each number occurs in a list:

class deleteduplicate:

    def __init__(self):
        a=[]
        num=int(input("Enter the number of elements"))
        for i in range(0,num):
            try:
                a.append(int(input("Enter the number {}".format(i))))
            except ValueError:
                print ("Wrong Input")
                i=i-1

        flagarray=[]
        countarray=[]
        j=0;
        for c in a:
            flagarray.append(False)
            countarray.append(1)

        for c in a:
            count=1
            flag=False
            ca=[]
            for i in range(j,len(a)):

                if a[i] == c and flagarray[i]==False:


                    flag=True
                    count=count+1
                    flagarray[i]=True
                    ca.append(i)
            if  len(ca)&gt;0:
                print(str(c)+"ocuurs"+str(len(ca))+"times")

            j=j+1

deleteduplicate()
Welcome to code review.
Style
Check PEP0008 the official Python style guide for maintaining code within Python acceptable standards.

Class names: Apart from the fact that this is a bad use of classes, class names should be UpperCaseCamelCase which implies that since this
delete_duplicates is a class, then the name should be DeleteDuplicates.
Method/function/variable names: should be lowercase and words separated by underscores ex: flagarray=[] is flag_array = []
Space around operators: a space should be left on both sides of a binary operator: a=[] is a = [] and flagarray=[] is flag_array = []
Descriptive variable names: names should reflect the objects they represent and not names like j, c, i which are confusing because j could be a variable, a string, a number ...
f-strings: (Python 3.6 +) are better used for combining strings and variables in a single statement. ex: print(str(c)+&quot;ocuurs&quot;+str(len(ca))+&quot;times&quot;) can be print(f'{c!s} occurs {len(ca)} times')

Code

Functions: A function is a block of code which only runs when it is called. You can pass data, known as parameters, into a function. A function can return data as a result. Since this a bad use of classes because a class is usually used for an object with multi-attributes and multi-methods and this is not the case here, you might use a regular function.
Augmented assignment: Python supports augmented assignments ex: i=i-1 is i -= 1, count=count+1 is count += 1 ...
Semicolons: are for combining multiple short statements on the same line, this j=0; (line 15) is an invalid use of semicolons.
Comparison to True and False: is usually done using if something: and if not something_else: ex: flagarray[i]==False: is if not flag_array[i]:. Non-empty sequences and non-zero variables evaluate to True ex: if  len(ca)&gt;0: is if ca:
Inefficiency: If you need to print duplicates of a list you shouldn't be entering each of the list members manually (what if you have a list of size 10,000,000 items? will you be manually entering one by one?)
Counter() You could use counter dict from the collections library for counting list members

An improved version:
If you want to get duplicates and print them:
from collections import Counter


def get_duplicates(numbers: list):
    &quot;&quot;&quot;Return list duplicates.&quot;&quot;&quot;
    num_duplicates = Counter(numbers)
    return {item for item in num_duplicates if num_duplicates[item] &gt; 1}


if __name__ == '__main__':
    list_of_duplicates = [1, 2, 2, 3, 4, 3, 5, 2, 7, 1, ]
    print(get_duplicates(list_of_duplicates))

If you want to delete duplicates then use a set
print(set(list_of_duplicates))

output: {1, 2, 3, 4, 5, 7}