title: How can i read a text file and create a 'if else' according to text, using python?
body: <p>file.txt contains only "1" number.</p>
  
  <p>I tried this but didn't worked.</p>
  
  <pre><code>file = open("file.txt", "r")
  if file.read() == "1":
      print("something")
  else:
      print("else")
  file.close()
  </code></pre>