Материал из Википедии — свободной энциклопедии
# -*- coding: UTF-8 -*-
__version__='$Id:'
import re, sys
import codecs
def main(fvih):
f1=codecs.open(fvih, 'wb')
c=ord('a')
while c<=ord('z'):
te=chr(c)
t='[%s]x[/%s]'%(te,te)
f1.write(t)
f1.flush()
c+=1
return
b=ord('a')
while b<=ord('z'):
c=ord('a')
while c<=ord('z'):
te=chr(b)+chr(c)
t='[%s]x[/%s]'%(te,te)
f1.write(t)
f1.flush()
c+=1
f1.write('\n')
f1.flush()
b+=1
return
a=ord('a')
while a<=ord('z'):
b=ord('a')
while b<=ord('z'):
c=ord('a')
while c<=ord('z'):
te=chr(a)+chr(b)+chr(c)
t='[%s]x[/%s]'%(te,te)
f1.write(t)
f1.flush()
c+=1
f1.write('\n')
f1.flush()
b+=1
a+=1
main(sys.argv[1])