def convert_sv_text(text):
 ret_lines = []
 for line in text.splitlines():
  line = convert_sv_line(line)
  if ('DCDCDC' not in line):
   ret_lines.append(line)
 return ret_lines

def convert_sv_text ( text ) : ret_lines = [ ] for line in text . splitlines ( ) : line = convert_sv_line ( line ) if ( 'DCDCDC' not in line ) : ret_lines . append ( line ) return ret_lines
normalize senate vote text from pdftotext senate votes come out of pdftotext with characters shifted in weird way convert_sv_text converts that text to a readable format with junk stripped example after decoding: officialrollcall newmexicostatesenate fiftiethlegislature .