i would Like to display the word 'conflict' if the value is more than one in the list. this is my code
list = ['aa','bb','cc','aa']
conf = [s for s in list]
for a in list:
if len(a in conf) > 1:
print a, "-conflict"
else:
print a
I think my syntax is wrong in if len(a in conf)> 1: Please help me.
I am expecting this result:
aa - conflict
bb
cc
aa - conflict