How To Write Output To Text File In Python