【发布时间】:2019-01-23 22:50:51
【问题描述】:
文本文件包含奶酪的名称及其属性。每种奶酪的属性数量都不相同。 最终结果是一个字典,其中每个奶酪的名称是一个键,其属性是链接到该键的集合。
除了手动将每组属性复制到一个集合中并分配正确的键之外,还有其他方法吗?
champignon de luxe garlic,soft,soft-ripened,garlicky,herbaceous,herbal,spicy,cream,creamy,natural
bleu dauvergne,semi-soft,artisan,buttery,creamy,grassy,herbaceous,salty,spicy,tangy,strong,ivory,creamy and smooth,bloomy
【问题讨论】:
-
本题中没有python。
标签: python dictionary