how to make the space between column 1 and 2 the same
<p>I am at the moment trying to filter a lexicon/dictionary such that it only contains the word i need. The dictionary has two column first being the word, and the second being the phonetic pronunciation (see the image below).</p>

<p><img src="http://i.stack.imgur.com/VXJMZ.png" alt="Snippet of lexicon"></p>

<p>The lexicon is available <a href="http://svn.code.sf.net/p/cmusphinx/code/trunk/cmudict/sphinxdict/cmudict.0.7a_SPHINX_40" rel="nofollow">here</a>.</p>

<p>Is there some way I can make this space/delimiter even for all the cases...  It would make things a lot more easier.</p>

<p>you mean something like the following?
<a href="http://pastebin.com/qvyEmbUr" rel="nofollow">here</a></p>

<p>In this case, this is the code (without using any particular characters):</p>

<pre><code>#!/usr/bin/env python2

import sys

path_to_the_file = sys.argv[1]

word = []
pron = []
maxword = 0
with open(path_to_the_file) as fr:
    for line in fr:
        words = line.split()
        word.append(words[0])
        pron.append(' '.join(words[1:]))
        if len(words[0]) &gt; maxword: maxword = len(words[0])

format_str = '{:'+str(maxword)+'s}  {:s}\n'

msg = ''
for w,p in zip(word,pron):
    msg += format_str.format(w,p)

print msg
</code></pre>

python unix text file-handling