this is my code :
a =
'''def fun():
print 'bbb'
'''
eval(a)
fun()
but it shows error :
Traceback (most recent call last):
File "c.py", line 8, in <module>
eval(a)
File "<string>", line 1
def fun():
^
SyntaxError: invalid syntax
so what can i do ,
thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…