【发布时间】:2020-09-28 16:01:33
【问题描述】:
games = {
"1":"GTA V,FarCry 5",
"2":"Watchdogs II,South Park: The Stick of Truth",
"3":"For Honor,The Forest,South Park: The Fractured but whole"}
for games_value in games.values():
games_value.split(",")
但这无济于事......
我想要什么:
games = {
"1":"GTA V","FarCry 5"
"2":"Watchdogs II","South Park: The Stick of Truth"
"3":"For Honor","The Forest","South Park: The Fractured but whole"}
提前致谢!
【问题讨论】:
-
但是通过这样做我创建了一个新字典...我没有使用原来的字典(我没有通过字符串操作编辑字典...做这个方法我创建了一个全新的字典或者我误解?)
标签: python dictionary split key-value-store