Data Structures
Data Structures : It a storage that is used to store and
organize the data.
Data Structures Types :
Built In
User Defined
Built In :
It a data type that are pre-defined by
Programming Language.
Types Of Built In Data Types :
List
Tuple
Set
Dictionaries
User Defined :
It is a data type that derived from an existing
data Types.
Types of User Defined Data Types :
Stack
Queue
Linked List
Tree
Graph
Built In Types :
1) List :
i) It is a Collection of ordered Data.
ii) It is represented by Square Bracket [ ].
iii) List is mutable.
iv) List allows duplicate elements.
v) List can use nested among all.
vi) List can be created using list() function.
Example :
2) Tuple :
i) It is an ordered collection of data.
ii) It is represented by Parentheses ( ).
iii) Tuple is immutable.
iv) Tuple allows duplicate elements.
v) Tuple can use nested among all.
vi) It can be created using tuple() function.
Example :
3) Set :
i) It is an unordered collection of data.
ii) It is represented by Curly Bracket { }.
iii) Set is mutable.
iv) Set will not allow duplicate elements.
v) Set can use nested among all.
vi) Set can be created using set() function.
Example :
4) Dictionaries :
i)It is an unordered collection of data that stores
data in key-value pairs.
ii) It can be represented by Curly Bracket { }.
iii) Dictionary is mutable.
iv) Dictionary doesn’t allow duplicate keys.
v) Dictionary can use nested among all.
vi) Dictionary can be created using dict()
function.
Example :