Counting collisions in a Python dictionary

前端 未结 3 1669
眼角桃花
眼角桃花 2020-12-28 19:09

my first time posting here, so hope I\'ve asked my question in the right sort of way,

After adding an element to a Python dictionary, is it possible to get Python to

3条回答
  •  余生分开走
    2020-12-28 20:02

    If your keys are guaranteed to be unique integers, and since Python uses hash() on the keys, then you should be guaranteed not to have any collisions.

提交回复
热议问题