ZhangZhihui's Blog  
>>> a = ['a', 'b', 'c']
>>> cmd = 'a.pop()'
>>> exec(cmd)
>>> a
['a', 'b']
>>> cmd = 'c = a.pop()'
>>> exec(cmd)
>>> c
'b'

 

posted on 2022-04-01 23:18  ZhangZhihuiAAA  阅读(23)  评论(0编辑  收藏  举报