Jerry He wrote: > Hi, > suppose I have the following string > > cmdstr = "b = lambda s: s*s" > > Is there a way to execute this string other than > copying it onto a file and then importing it? >>> exec "b = lambda s: s*s" >>> b <function <lambda> at 0x4d69cc>