Hi. Is it possible to exec() from within a function so the exec'd code affects global? For example def foo(): exec ('X=[1,2,3]') And I'd like 'X' to be a global variable. Thanks, Gerald