title: Difficulty detecting an empty list
body: <p>I need to take a list of words and return a list of the palindromes found in the original list. I have got the code that works to do that, but if the list doesn't need to contain any palindromes it needs to print a statement saying none found.</p>
  
  <p>I have looked at other questions/answers on here on how to check if a list is empty, but I couldn't find any that were relevant to my function, where I'm creating the list in a for loop, and needing to check whether the list I'm creating contains anything. The examples I found were only checking pre made lists.</p>
  
  <p>This is the code that works to create the list of palindromes in the format needed:</p>
  
  <pre><code>def is_palindrome(words):
  
      """Returns the palindromes from a list of words."""
      print("\nThe following palindromes were found: ")
      for word in words:
          if word == word[::-1] and len(word) &gt;= 3:
              print(' -', word)
  </code></pre>
  
  <p>And this was my attempt:</p>
  
  <pre><code>def is_palindrome(words):
  
      """Returns the palindromes from a list of words."""
      print("\nThe following palindromes were found: ")
      palindromes = []
      for word in words:
          if word == word[::-1] and len(word) &gt;= 3:
              palindromes.append(word)
              if palindromes != []:
                  print(' -', word)
              else:
                  print('None found...')
  </code></pre>
  
  <p>But the 'none found' is never printed.</p>
  
  <p>Advice as to where I'm going wrong would be much appreciated, thanks.</p>