title: Unable to iterate a list and compare strings python
body: <p>I am new to python programming and I really need help in comparing values in a list.</p>
  
  <p>I have two lists(drink,food) .I'm not doing a comparison between two lists. What i am trying to do is comparing all the values within a list by itself. </p>
  
  <p>So, I have to first compare all the values in drink list first using a for loop and an if-else statement. If there's a match in drink, I will do another for loop for food list and compare the values in food list using an if-else statement. </p>
  
  <p>These are my code:</p>
  
  <pre><code>drinks = []
  food = []
  
  drinks.append("lemontea")
  drinks.append("coke")
  drinks.append("sprite")
  drinks.append("orangejuice")
  drinks.append("fantagrape")
  
  food.append("nugget")
  food.append("pizza")
  food.append("chickenwing")
  food.append("fries")
  food.append("pizza")
  
  for i in drinks:
      if i == drinks:
          for j in food:
              if j == food:
                  print("fail")
      else:
           print("success") 
  </code></pre>
  
  <p>My issue is that I am supposed to be getting an 'failed' output as I have the same item in the food list that is pizza. Also, i'm not sure why am i getting 5 success output when im expected to get either only 1 'failed' or 'success' output. </p>
  
  <p>This is my output i got:</p>
  
  <pre><code>success
  success
  success
  success
  success
  </code></pre>
  
  <p>I would appreciate if any help was given. Thank you. </p>
  
  <p>Update:
  Thanks for the reply but however, it seem that people are confused with my question, hence im providing more information.</p>
  
  <p>The reason why i have to compare each item in a list is because the items are generated randomly and are of string type which are then appended to the list. For example, the first item generated is '00100ABC'and so on. So in case, there are duplicate values/item in the list, i have to give an error message. </p>