Shell script to run a python program on multiple entries in a file

Hello

I am trying to run a python program using shell script, which takes a single argument from a file.

This file has one entry per line :

1aaa
2bbb
3ccc
4ddd
5eee
...
...
...

My shell script runs the program, only for the last entry :

#!/bin/sh
IFS=$'\n'

for line in $(cat my_filename);
do
        python my_program.py $line > output.file
done

Can someone help me with this?
I need to run this program for all the entries (per line) in my file.

Thanks!

#!/bin/ksh

\rm -rf output.file
while read line
do
   python my_program.py $line >> output.file
done < my_filename

Thanks so much!