我试图通过给字典中的函数名来创建函数,
实际上,我不确定这是否可行,她就是我要做的:
def functions_factory(my_dict):
for the name in my_dict:
create_function(name)
def create_function(function_name):
x=0
# **code implentation:** here should write a code that can create function with name = <function_name>
Tags:
试试这个
输出:
相关问题 更多 >
编程相关推荐