title: How to only print one line from a txt file? (python)
body: <p>Im trying to create a program which only reads/prints a certain line in python. So far i have got this:</p>
  
  <pre><code>import random
  import time
  a = open("settings.txt", "r")
  b = open("settings.txt", "a")
  adding = input("Enter Name: ")
  with open("settings.txt", "a") as f:
       f.write("\n{}".format(adding))
  data = [line.rstrip() for line in a.readlines()]
  print(", ".join(data))
  time.sleep(10)
  </code></pre>
  
  <p>In my settings.txt:</p>
  
  <pre><code>Blah 1 
  Blah 2
  Blah 3
  </code></pre>
  
  <p>How do I only get the program to print (for example) Blah 1 and nothing else from that txt file?</p>