giving input to a python wch has been called frm shell script....urgent

i'm calling a python script from shell script. the python needs Y as an input everytime. how can i giv it thru shell script.
I tried below code

for arg in `cat erd_gen_list.lst`
do
generateErdSql.py -S $arg << Y
done

This is giving me err : `<<' unmatched

pls help.

To keep the forums high quality for all users, please take the time to format your posts correctly.

Most importantly, use Code Tags when you post any code or data samples so others can easily read your code. You can easily do this by highlighting your code and then clicking on the # in the editing menu. (You can also type code tags

```text
 and 
```

by hand.)

Thank You.

The UNIX and Linux Forums

---------- Post updated at 10:18 AM ---------- Previous update was at 10:17 AM ----------

you should have a programed named "yes" on your computer.

yes | python script