hi,<br>I'm not sure how I can use exec within a function correctly<br>here is the code i'm using:<br><br>def a():<br> exec('b=1')<br> print(b)<br><br>a()<br><br>this will raise an error, but I would like to see it outputting 1<br>
<br>thanks<br>smk<br><br>