Is there a way for avoiding converting dictinary type as format in string executed by exec()?

后端 未结 0 1139
轻奢々
轻奢々 2020-11-29 08:17

sample code:

a = """    
root={root},    
root_dic = {root:0},    
print(root, root_dic)""".format(root=1)    
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题