title: Python loop won't exit on specific user input
body: <p>Sorry if this is a common question, but every solution I've looked up so far doesn't seem to work.</p>
  
  <p>Basically, I want this loop to exit when the user enters "end" but for some reason it won't actually break the loop.</p>
  
  <pre><code>command = input("Enter command: ") + "\r\n"
  while(True):
      print(command)
      if command == "end":
          break
      else:
          tn.write(command.encode("utf-8"))
          ret1 = tn.read_until(b"_DNE", timeout = 10)
          print(ret1)
          command = input("Enter command: ") + "\r\n"
  </code></pre>
  
  <p>If the user inputs "end" it seems like it ignores the "if" statement and just skips straight to "else"</p>