Reading and Writing files in python

<file pointer>.write(string) writes the contents of string to the file, returning none.

fileTest = open(myFile.txt, 'w')
fileTest.write("sample string");
fileTest.close()