我怎样才能像这样打印出词典列表
Tino Black
Alex Blue
Meow Red
Woof White
我希望左栏是名字,右栏是每个名字的颜色
这是我的密码:
ask = input("Name and colour: ")
colourList = {}
while ask:
name, colour = ask.split()
colourList[name] = colour
ask = input("Name and colour: ")
print(colourList)
Tags:
您可以这样做,例如:
相关问题 更多 >
编程相关推荐