title: The If else statement for Python's subprocess doesn't seem to work
body: <p>I created a simple script to locate a user on the local machine. Despite entering any characters in the input box, the answer remains the same. I am grateful for any assistance.</p>
  <pre><code>#!/usr/bin/python
  
  import subprocess
  
  user = input(&quot;Enter username : &quot;)
  
  result = subprocess.getoutput(&quot;getent passwd&quot; + user)
  if result:
   print((&quot;found &quot;+user+&quot; user in this system.&quot;))
  else:
   print((&quot;&quot;+user+&quot; is not found...&quot;))
  </code></pre>