Created
August 14, 2014 17:45
-
-
Save anonymous/b0beb5dc24abc6669f8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-*- coding:utf-8 -*- | |
import re | |
import random | |
import codecs | |
I=open('.\CET.Shuffle.txt','r') | |
O=open('.\CET.Rebuild.txt','w') | |
Lines=I.readlines(); | |
for Line in Lines: | |
if Line[0]=='A': | |
Splited=Line.split(' ') | |
NewLine=Splited[0]+' '+Splited[2]+' '+Splited[1] | |
NewLine=NewLine.replace('\r','') | |
NewLine=NewLine.replace('\n','') | |
NewLine=NewLine+'\r\n' | |
O.write(NewLine) | |
else: | |
O.write(Line) | |
I.close() | |
O.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment