我有一个python元组,其中包含如下项:
kone = ('ice_cream', 'sprinkles', 'toppings', 'nuts', 'cherries')
我正试图将该元组添加到命令行调用中,但格式设置已关闭。我当前的代码如下所示:
subprocess.popen("python", str(kone))
但我会称之为
('python',"('ice_cream', 'sprinkles', 'toppings', 'nuts', 'cherries')")
如何编辑代码,使其只返回“通力”中的内容:
('python','ice_cream', 'sprinkles', 'toppings', 'nuts', 'cherries')
你可以做:
相关问题 更多 >
编程相关推荐