title: How to loop this code back to the beginning?
body: <p>Could anyone help me with looping this code back to the beginning if the user inputs yes and ending the program if the user inputs no?</p>
  
  <pre><code>while True:
      print ("Hello, this is a program to check if a word is a palindrome or not.")
      word = input("Enter a word: ")
      word = word.casefold()
      revword = reversed(word)
      if list(word) == list(revword):
          print ("The word" ,word, "is a palindrome.")
      else:
          print("The word" ,word, "is not a palindrome.")
      print ("Would you like to check another word?")
      ans = input()
      if ans == ("Yes") :
        #here to return to beginning
      else ans == ("No"):
          print ("Goodbye")
  </code></pre>