output write('boo!\ 'writing text (str output write( writing non-text (inttraceback (most recent call last)file ""line in typeerrormust be strnot int write(only accepts text there is one last issue to address with writing data to files iunlike the print(functionthe write(function can only handle text arguments the print(function automatically converts non-text valueswrite(does not thereforewe must do the conversion ourselves