with open('/tmp/test.out','w') as fp: for i in range(5): fp.write(str(i)) #It writes into file /tmp/test.out below: %cat /tmp/test.out
01234
Last updated 4 years ago