def create_test_submission(filename, prediction):
    content = ['id,ACTION']
    for i, p in enumerate(prediction):
        content.append((i+1,p) %'%i,%f')
    f = open(filename, 'w')
    f.write('\n'.join(content))
    f.close()
    print 'Saved'
dataset/ETHPy150Open zigahertz/2013-Sep-HR-ML-sprint/py/nightmaremode.py/create_test_submission/swapped operands of `%`