human
create dictionary from list of variables
assistant
Here is some code to create dictionary from list of variables 'foo' and 'bar' already defined

dict((k, globals()[k]) for k in ('foo', 'bar'))

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.