What is a data structure?
Data structure refers to the existence of one or more relationships between the collection of elements and the data elements in the collection of the relationship between the composition.
Here's an example to understand this data structure:
Data can be likened to books, data structure equivalent to bookshelves, books stored on the shelves, to hold books, we get the shelves to fetch. In order to get the desired book faster, you can arrange the book in a certain way. For example, the shelves into the N-level, (Cartoon book on the first floor, literature book on the second floor ...) Different kinds of books are placed in different layers of the bookshelf.
This is an understanding of the popular data structure.
Data structure classification of Python
Data structures in Python can be collectively referred to as Containers (container, the container that holds the data), and it has three types: sequences (lists and tuples), collections (sets), and mappings (such as dictionaries):
List of lists for example: List1 = [' P ', ' y ', ' t ', ' h ', ' o ', ' n ']
Tuple tuples For example: Tuple1 = (' P ', ' y ', ' t ', ' h ', ' o ', ' n ')
Set set for example: set1={' P ', ' y ', ' t ', ' h ', ' o ', ' n '}
Dictionary dict For example: Dict1 ={1: ' P ', 2: ' Y ', 3: ' t ', 4: ' H ', 5: ' O ', 6: ' N '}
What are the differences and effects of these data structures? Our next article combines some practical methods of data structure manipulation to introduce them individually. To learn more in advance, go to the Code Bud Internet Café:Http://www.mayacoder.com/lesson/index
Python Beginners Learn the basics of data structures-cognition of data structures