File Write Functions Python Programming