How To Write Output To A Text File In Python