I am trying to remove all characters except alphabets along with the spaces.   

This is what my code looks like.   

Where sampletext.txt contains words with multiple characters, I am writing the result in removed.txt.
When I run this code. I am getting only blanks in removed.txt

```
import re
import sys
filename = open("removed.txt",'w')
sys.stdout = filename
from string import ascii_letters
allowed = set(ascii_letters + ' ')
with open("/Desktop/stem_analysis/sampletext.txt", 'r') as f:
    answer = ''.join(l for l in f if l in allowed)
print(answer)

```

Whats the problem with my code