title: In python I am not able to export the output in text format
body: <p>I have two string and I am trying to match each position and providing a symbol accordingly. I am very new to python and facing an issue with exporting the file. I am getting output but when I am exporting the same it gave None as out. The string look like this.</p>
  
  <pre><code>def up():
      for i in range (s3):
          if bp1[i]==bp2[i]:
              print("(", end="")
          else:
              print(".", end="")
  ax = up()
  with open('putt.txt', 'w') as a:
  print(ax, file = a)
  </code></pre>