20200105 - python learning Data Type Summary

to sum up

Data type in python: Integer / Boolean / string / tuple / list / dictionary / collection

 

Note: lists, dictionaries, collections can not be used as a dictionary key, it can not be used as elements in the collection

 

type of data:

  (1) integer

  (2) Boolean: only two values: True and Flase

  (3) the string

           Unique features: upper / lower / isdigit / strip / split / replace / encode / format / join

        Public functions: len / index / slice / step / for / delete / modify

  (4) tuple

           Unique Features: None

        Public functions: len / index / slice / step / for / delete [None] / [No] modification

  (5) List

           Unique features: upper / lower / isdigit / strip / split / replace / encode / format / join

        Public functions: len / index / slice / step / for / delete / modify

  (6) dictionary 

         Features: disordered

           Unique features: keys / values ​​/ items / get / pop / update

        Public functions: len / index / slice [no] / [No] step / for / delete / modify

  (7) collection

         Features: disordered and does not repeat

           独有功能:add/pop/update/intersection/union/difference/symmetric_difference

        Public functions: len / index [no] / section [no] / [No] step / for / delete [None] / [No] modification

Guess you like

Origin www.cnblogs.com/limin1027/p/12151665.html