python list and Comparative dict

Compare and list, dict has the following characteristics:

  1. Find and insert the fast, the key will not increase slowed;
  2. It takes a lot of memory, memory and more waste.

The opposite list:

  1. Find and insert a time increases the element increases;
  2. Small footprint, waste very little memory.

dict is a method for space time exchange.

Guess you like

Origin www.cnblogs.com/ooprogram/p/10980945.html