How To Write Output To A File In Python