Note : This tutorial only deals with the concept of data structure, I will discuss the next tutorial in detail.
Primitive data structures :
Primitive data structures are the basic ingredients in the Python programming language. These are predefined for storing data and the set of actions on these data structures are also predefined. It contains simple values of data.
Primitive data types in Python are as follows :
Strings are words or letters. It means string represents a group of alphabetic words or character which are quoted by single or double quotations. For example -
The integer represents numeric value without decimals. It is any whole number, positive or negative, like
Float or floating-point number represents numeric values ending with a decimal point. Such as
It represents only two values:
Non-primitive data structure:
These data are sophisticated and derived from the primitive data structures. Used for grouping of homogeneous (same kind) or heterogeneous (a different kind) data items.
Python has generally some built-in Non-primitive data structures, which can be divided into the following categories :
1. Sequence Type:
list, tuple, range
2. Set Types:
3. Mapping Type: