def color(x): ret = '' for i in range(0, 6): ret += hex(2 * (x // 8**i % 8))[2:] return ret f = open('index.html', 'w') f.write('\n') f.write('\n') for i in range(0, 2**18): try: f.write('' + chr(i) + '\n') except: pass f.write('\n') f.close()