write in file with python

Write in a file with python

$ TEST=`pwd`/test_insert.txt
$ export TEST
python -c "print '[foo]\nbar = a\n b\n c \n  de\n fg \nbaz = bif cb \n'" >  $TEST