title: Python how to store a print statement in a variable?
body: <p>I like to save the two print statements in 2 different variables.
  How can i do this?</p>
  
  <pre><code> with open(file_to_open) as f:
  
      for line in f:
          # split the line
          line = line.strip()
          columns = line.split(",")
  
          if columns[0] == "1":
             print(line, end='')
          if columns[0] == "2":
              print(line, end='')
  </code></pre>