Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (24 sloc) 549 Bytes
import csv
import sys
reader = csv.reader(sys.stdin, delimiter='|')
writer = csv.writer(sys.stdout, delimiter=',')
length = 0
length2 = 0
length3 = 0
length4 = 0
index = 0
for row in reader:
if (index > 0):
length = 0
length = len(row[1])
length2 = len(row[2])
length3 = len(row[3])
length4 = len(row[4])
row[1] = "x"*length
row[2] = 'x'*length2
row[3] = 'x'*length3
row[4] = 'x'*length4
writer.writerow(row)
else:
writer.writerow(row)
index += 1