Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Data Structures in Python.pptx

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 17 Publicité

Plus De Contenu Connexe

Plus récents (20)

Publicité

Data Structures in Python.pptx

  1. 1. Data Structures in Python
  2. 2. Data Structure  What is Data Structure?  Organizing, managing and storing data is important as it enables easier access and efficient modifications. Data Structures allows you to organize your data in such a way that enables you to store collections of data, relate them and perform operations on them accordingly.  Philosophy “Clever” ways to organize information in order to enable efficient computation
  3. 3. Goals  what the tools are for storing and processing common data types  which tools are appropriate for which need  So that make good design choices as a programmer  Another Goal is it must be rich in structure to reflect the actual relationship of data in real world .The structure should be simple enough for efficient processing of data .
  4. 4. Data
  5. 5. Built-in Data Structure  Understand Data  Understand the data according to its Nature.  Map the data with available structure.  choosing the right data structure for your data
  6. 6. Three W’s Why we are using data? What we are going to do with the data? Where we are sending data i.e location or container?
  7. 7. Python’s Data structure Data Structure Built-in Data Structure List Tuples User Defined Data Structure Dictionary Set Hash Map Graph Linked List Tree Stack Queue
  8. 8. Built-in Data structure List Dictionary Tuple Set
  9. 9. Lists  This Data structure use for storing and accesing objects which belongs in a specific sequence.  Lists are used to store multiple items in a single variable  Lists in Python are linear containers used for storing data of various Data Types. The ability to store a variety of data is what makes Lists a very unique and vital Data Structure in Python.
  10. 10. Examples  city_list=['Newyork','chicago', 'Los Angeles', 'Houston', 'Philadelphia', 'Dallas']  squares = [‘1’, ‘4, 9’, ’16’]  List with Mixed Data types  My_list = [‘1’ ,”Hello”, ‘3.5’]
  11. 11. Example  data = [{"id": ("1", "2", "3"), "name": ("Dannie", "Williams"), "department": ("HR", "IT")}, {"id": ("4", "5", "6"), "name": ("jhon", "smith"), "department": ("HR", "IT")}, {"id": ("7", "8", "9"), "name": ("Allen", "polard"), "department": ("finance", "IT")}, {"id": ("10", "11", "12"), "name": ("Reema", "Ferguson"), "department": ("business", "IT")}, {"id": ("13", "14", "15"), "name": ("patrick", "Donald"), "department": ("business", "IT")}]
  12. 12. List of Tweets
  13. 13. Features of Lists  Lists are ordered.  Lists can contain any arbitrary objects.  List elements can be accessed by index.  Lists are mutable.  Lists are dynamic.
  14. 14. Lists  Syntax  List_variables = [ val1,val2,val3…….]  My_list = [1,2,3]
  15. 15. List Indices  my_list =[1,2,3,4,5,6,7,8,9,10]
  16. 16. List Methods  Append()  Count  Index()  Insert()  Pop()  Remove()  Reverse()  Sort()  Extend()  If you want to remember these methods (ASPIRER)

×