Saving print output as excel file in pandas

Output = print (id, TripID, smalldistances[l:h].sum(), ab/3600)

Hi I am getting the following output using the above print command

1 1 0.0 0.553611111111
1 2 95.19986111111142 1.58166666667
1 3 352.15416666667164 7.07694444444
1 4 11395.440555555502 4.25916666667
1 5 189.84916666666717 2.02138888889
1 6 55.67638888888891 0.0572222222222
1 7 1132.024027777775 3.68305555556
1 8 294.8365277777796 2.96305555556
1 9 4936.00125 0.102777777778
1 10 256.63069444444466 0.303055555556
1 11 62.94750000000003 0.0269444444444
1 12 1356.0420833333299 1.82611111111
1 13 73.16055555555556 1.19861111111
1 14 151.39277777777772 1.5175
1 15 125.78333333333332 1.05472222222

I want to save the output as a separate excel file. I am trying ExcelWriter function but its not working. Kindly suggest.