SigmaQuan / Better-Python-59-Ways

Code Sample of Book "Effective Python: 59 Specific Ways to Write Better Pyton" by Brett Slatkin
1.39k stars 221 forks source link

Is the chile_len_set output order correct? #1

Open ejudgie opened 5 years ago

ejudgie commented 5 years ago

Shouldn't the output be "{5, 8, 7}"?

https://github.com/SigmaQuan/Better-Python-59-Ways/blob/9eaaba2539ca0b723442f9fcdf0455c7a1fe0584/item_07_list_not_map_filter.py#L61

Yummy26 commented 5 years ago

The order of keys in Dictionary is not along with the initiation. And it is hash table structure.