How can i convert decimal to Octal in Python2.6, for 1 to 100000? I wanna get this converted result as .txt too. Can someone help me?
A:
This should do the trick:
text = '\n'.join(str(oct(i)) for i in xrange(100000))
f = open('foo.txt', 'w')
f.write(text)
f.close()
meeselet
2010-04-03 16:38:30