Error in Code
So I was writing a program in which few numbers had to be entered and those numbers needed to be checked for duplicates. Here's the code I wrote: class prog1: def main(): print("Enter 5 numbers \n") a = list(5) for i in range(0,5): a[i] = int(input()) c = 0 for i in range(0,5): for j in range(0,5): if (a [i] == a[j]): c+=1 break if (c>0): print("Duplicate numbers in list") else: print("No duplicate numbers in list") However, I keep receiving this error: Traceback (most recent call last): File "<pyshell#46>", line 1, in <module> prog1.main() File "D:/Installed/IDLE/Practice/prog1.py", line 4, in main a = list(5) TypeError: 'int' object is not iterable Could anyone help me with the error?