推 Yshuan: 你畫成樹狀圖來看 試著對樹做traversal 10/01 03:28
推 lc85301: I got an Apple... (誤 10/01 11:14
推 IMPOSSIBLEr: you need to know the outer key in order to get 10/01 13:11
→ IMPOSSIBLEr: the inner dict. And from your first case, you a 10/01 13:11
→ IMPOSSIBLEr: re trying to get the keys from given value whic 10/01 13:11
→ IMPOSSIBLEr: h is not what a dict can do. You need to write 10/01 13:11
→ IMPOSSIBLEr: a class which extends dict and implement this s 10/01 13:11
→ IMPOSSIBLEr: pecial method. 10/01 13:11
推 s06yji3: 做另一個dict用價錢當key,value用list紀錄商品 10/01 19:46
推 longlongint: 改用sql吧 10/04 12:12
推 BigBank: 可用for xx in dict.items() 去找 xx[0]是keys xx[1]是值 10/06 03:11
→ BigBank: 詳細做法可參考下篇 不過使用.items()是最簡單的方法了 10/06 03:11