python利用locals()循环生成变量名 createVar = locals()for i in city:createVar[i] = data[data[‘city’]==i]这里的i是字符串,如果是数值用str(i)变成字符串 python编程 2023-11-24 48 点赞 0 评论 72 浏览