分别输入key和value,key输入回车结束
dic?=?{}while?True:
key?=?input('Input?key:')
if?key?==?'':
break
value?=?input('Input?value:')
dic[key]?=?value
for?key,?value?in?dic.items():
print(key?+?'?:?'?+?value)
分别输入key和value,key输入回车结束
dic?=?{}while?True:
key?=?input('Input?key:')
if?key?==?'':
break
value?=?input('Input?value:')
dic[key]?=?value
for?key,?value?in?dic.items():
print(key?+?'?:?'?+?value)