duweifu
posted @ 2011年9月22日 22:13
in Scrawl
, 1077 阅读
def ExcelColumns(num):
res = ''
while num > 0:
res = chr(ord('A') + ((num-1) % 26)) + res
num = (num-1) / 26
return res
if __name__ == '__main__':
all_columns = [ExcelColumns(i) for i in range(1000)]
print all_columns[1:]