I want to know whether there is an equivalent statement in lists to do the following. In MATLAB I would do the following
fid = fopen(\'inc.txt\',\'w\') init
test.py contains :
test.py
#!/bin/env python f = open("test.txt","wb") for i in range(1,50,5): f.write("%d\n"%i) f.close()
You can execute
python test.py
file test.txt would look like this :
test.txt
1 6 11 16 21 26 31 36 41 46