write(str)

Write a string to the file. There is no return value. Due to buffering, the string may not actually show up in the file until the file.flush or file.close method is called.