8th_has_duplicate_check_function
def has_duplicates(v):#Called function
c=0
for i in range(len(v)):
for j in range(i+1,len(v)):
if v[i]==v[j]:
c=c+1
if c>0:
print(True)
else:
print(False)
v=[1,2,3,2,3]#main() function
print("List is: ",v)
has_duplicates(v)#Calling function
Comments
Post a Comment