python自帶函數(shù)——執(zhí)行命令函數(shù) exec
提問人:楊紫紅發(fā)布時間:2020-11-18
>>> my_small_program = '''print('ham')
print('sandwich')'''
>>> exec(my_small_program)
ham
sandwich
繼續(xù)查找其他問題的答案?
相關(guān)視頻回答
>>> my_small_program = '''print('ham')
print('sandwich')'''
>>> exec(my_small_program)
ham
sandwich
點擊加載更多評論>>