How do you eliminate spaces from a list? Python : <pre><code>val = []

for c in f:

    val.append(ord(c))

val = [w - 5 if w &gt; 20 else w for w in val]
</code></pre>

<p>The original text file contains a sentence which has many spaces in it. When converting the text file into its ASCII code it also converts the spaces into its ASCII code.</p>
