Possible Duplicate:
Joining List has integer values with python
I'm having a syntax problem with for loops and list in python. I'm trying to export a list of numbers that's exported to a text file that's space delimited.
Example: what should be in the text file 0 5 10 15 20
The code I'm using is below, any ideas how to fix this.
f = open("test.txt", "w")
mylist=[]
for i in range(0,20+1, 5):
mylist.append(i)
f.writelines(mylist)
f.close()