On Tuesday, April 26, 2016 at 11:38:21 AM UTC-4, Ali Rezaee wrote:
>
> Hi everyone,
>
> I am trying to run the code below. When I try the code outside of a 
> function and in REPL, it runs successfully. However when I run it using a 
> function it throw an error.
> Why do I get the error? and how can I solve this problem?
>

"eval" evaluates expressions in global scope, so local variables like those 
in functions are not accessible.

There is certainly a better way to do whatever you are trying to do.   What 
is your objective here? 

Reply via email to