title: How to save the following python output result to .csv format
body: <p>How can I save the result from this code to .csv format?</p>
  
  <pre><code>import re
  import CSV
  
  text = open('example.txt').read()
  pattern = r'([0-9]+)[:]([0-9]+)[:](.*)'
  regex = re.compile(pattern)
  for match in regex.finditer(text):
        result = ("{},{}".format(match.group(2),match.group(3)))
  </code></pre>