Minimal working example of my code:
# Create output data file out_data_file = open(\'output_file\',\'w\') out_data_file.write(\"# Header \\n\") out_data_file.clo
f.write('Text'+' '+' '.join('%d' % item for item in list1))
Or, since it looks like you are OK with the default conversion of an integer to string:
f.write('Text'+' '+' '.join(str(item) for item in list1))