Python: Data Types

1. Digital (Number): which is divided int (integer), float (floating point), bool (Boolean), complex (plural).
2. String (String): need '' or '' wrapped. If you need to keep the inside of 'or "required \ escaped.
3. list (List): the format of the list is written between square brackets [], comma-separated list of element names may be added after [. numbers] to the index value of the target position is counted from the index 0.
4 tuples (tuple):. tuple format between a write () in parentheses, separated by commas elements and element order tuple and modifying the list but not the same suffix can [digital] index.
the set (set): the set format is written between {}, is a disorder not repeat braces {} may be used or a sET (. ) function to create the collection.
6. dictionary (Dictionary): the format of the dictionary is written between {}, and differs in that each element of the set corresponds to a dictionary as an index key is a dictionary mapping type, it. It is disordered key (key): value (value) may be set to use or braces {} dict () function to create the dictionary.

Guess you like

Origin blog.csdn.net/weixin_44523387/article/details/93379439