#Chapter 46 program to find if there is a duplicate in a list #define an array of 1000 elements import random a = [] for n in range(1000): randomNum = random.randint(1,50000) a.append(randomNum) duplicate = False countOfStatements = 0 n = len(a) for i in range(n-1): for j in range((i+1),n): countOfStatements += 1 if a[i] == a[j]: duplicate = True print (i,j," a[i] = ", a[i],"a[j] = ",a[j], "duplicate = ", duplicate) print("count Of Statements", countOfStatements)