Within a Jupiter Notebook (Python kernel) I would like to pass a list of strings to a %%bash cell to use in a for loop.
I can do the following:
message = 'hello'
messages = ['hello', 'there']
%%bash -s {message}
echo $1
This works fine. But when I try to pass the list messages in the manner below I get ‘[hello,’.
%%bash -s {messages}
for i in $1@
do
echo $i
done