使一段文本乱序

2016-09-27  本文已影响0人  paul7

#coding: utf-8

from random import shuffle

s = open('aa.txt').read()

s = unicode(s)

sl = list(s)

shuffle(sl)

file('bb.txt' , 'w').write(''.join(i for i in sl))

上一篇 下一篇

猜你喜欢

热点阅读