Python Write Text Array To File