Python Dictionary


```typefor key, value in dict.items():	blabla```

[dotdict](https://texonom.com/dotdict-ed7029da0f82400aba9f5450cae5b0ec)


[easydict](https://texonom.com/easydict-227b22abef954438993b2f3dbb6f13fe)

- update exist so there is no + operation between dict
- internally hash key
- no order
- clear member function exist
keys() - dict_keys type
values() - dict_values
items() - tuple - dict_items

[python dictionary comprehension](https://texonom.com/python-dictionary-comprehension-60a3653adc66413b9e7b0a5a99ca2fa1)




### Sort
```type# key basedsorted_dict = sorted(my_dict.items(), key = lambda item: item[0])# value basedsorted_dict = sorted(my_dict.items(), key = lambda item: item[1])```



> dict[key] kill program when there is no key, but get(key) return none (or key in dict)

> PyPrnt - prnt beauty list and dictionary



> [Python - dict 정렬 (Key, Value로 sorting)](https://codechacha.com/ko/python-sorting-dict/)

> [Iterating over dictionaries using 'for' loops](https://stackoverflow.com/questions/3294889/iterating-over-dictionaries-using-for-loops)





