Python Write To Text File Stack Overflow