Successfully reported this slideshow.
Your SlideShare is downloading. ×

What are Data structures in Python? | List, Dictionary, Tuple Explained | Edureka

Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Ad
Upcoming SlideShare
Chapter 9
Chapter 9
Loading in …3
×

Check these out next

1 of 31 Ad

What are Data structures in Python? | List, Dictionary, Tuple Explained | Edureka

YouTube Link: https://youtu.be/m9n2f9lhtrw
** Python Certification Training: https://www.edureka.co/data-science-python-certification-course **
This Edureka video on 'Data Structures in Python' will help you understand the various data structures that Python has built into itself such as the list, dictionary, tuple and more. Further, we will also understand stacks, queues, trees and how they are implemented in Python using classes and functions. The video is divided into the following parts:
What are Data Structures?
Why are Data Structures needed?
Types of Data Structures in Python
Built-In Data Structures
Lists
Dictionary
Tuple
Sets
User-Defined Data Structure
Array
Stack
Queue
Linked List
Tree
Graph

Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in

YouTube Link: https://youtu.be/m9n2f9lhtrw
** Python Certification Training: https://www.edureka.co/data-science-python-certification-course **
This Edureka video on 'Data Structures in Python' will help you understand the various data structures that Python has built into itself such as the list, dictionary, tuple and more. Further, we will also understand stacks, queues, trees and how they are implemented in Python using classes and functions. The video is divided into the following parts:
What are Data Structures?
Why are Data Structures needed?
Types of Data Structures in Python
Built-In Data Structures
Lists
Dictionary
Tuple
Sets
User-Defined Data Structure
Array
Stack
Queue
Linked List
Tree
Graph

Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
Castbox: https://castbox.fm/networks/505?country=in

Advertisement
Advertisement

More Related Content

Advertisement

Recently uploaded (20)

Advertisement

What are Data structures in Python? | List, Dictionary, Tuple Explained | Edureka

  1. 1. Copyright © 2017, edureka and/or its affiliates. All rights reserved.
  2. 2. • What are Data Structures? • Why are Data Structures needed? • Types of Data Structures in Python • Built-In Data Structures ✓ Lists ✓ Dictionary ✓ Tuple ✓ Sets • User-Defined Data Structure ✓ Array ✓ Stack ✓ Queue ✓ Linked List ✓ Tree ✓ Graph www.edureka.co www.edureka.co/python
  3. 3. www.edureka.co/python
  4. 4. What are Data Structures? www.edureka.co/python Open Source OOPS Large Standard Library Easy to Learn Data Structures are used to organize, store and manage data for efficient access and modification
  5. 5. www.edureka.co/python
  6. 6. Why are Data Structures needed? www.edureka.co/python • Imagine your workspace set according to your needs • Helps you work faster because it is imprinted in your mind • Change in workspace leads to increase in time to access your requirement • Same goes for data, as it needs to be stored efficiently which results in better access and modification
  7. 7. Types of Data Structures in Python www.edureka.co/python
  8. 8. Types of Data Structures in Python www.edureka.co/python Data Structures in Python User-Defined Data Structures Built-in Data Structures List Dictionary Set Tuple Stack Queue LinkedList Tree HashMap Graph
  9. 9. www.edureka.co/python
  10. 10. Built-In Data Structures www.edureka.co/python Large Standard Library Tuples Dictionary Sets Lists
  11. 11. Built-In Data Structures www.edureka.co/python Open Source Large Standard Library Lists Tuples Dictionary Sets • Lists can have heterogenous data types in them • Lists are mutable
  12. 12. Built-In Data Structures www.edureka.co/python Open Source Large Standard Library Lists Tuples Dictionary Sets • Same as lists but not mutable • Faster than lists
  13. 13. Built-In Data Structures www.edureka.co/python Open Source Large Standard Library Lists Tuples Dictionary Sets • Hold key, value pairs • Dictionaries are mutable
  14. 14. Built-In Data Structures www.edureka.co/python Open Source Large Standard Library Lists Tuples Dictionary Sets • Un-ordered collection of unique elements • Sets are mutable
  15. 15. www.edureka.co/python
  16. 16. User-Defined Data Structures www.edureka.co/python Stack Trees Queues HashMaps Linked List Graphs
  17. 17. User-Defined Data Structures www.edureka.co/python Arrays 12 1 56 13 134 0 1 2 3 4 1.2 1.0 5.6 1.3 13.4 0 1 2 3 4 • Arrays are used to store data of just one type • They have index which is used to access the data accordingly
  18. 18. User-Defined Data Structures www.edureka.co/python Stack 1 2 3 • Stacks are made from arrays • Stacks follow the LIFO principle • They have a pointer called TOP which is to track the top of the element TOP
  19. 19. User-Defined Data Structures www.edureka.co/python Push 1 2 3 • This is the push operation where data is added into the stack TOP
  20. 20. User-Defined Data Structures www.edureka.co/python 1 2 3 TOP • This is the push operation where data is added into the stack Push
  21. 21. User-Defined Data Structures www.edureka.co/python 1 2 3TOP • This is the push operation where data is added into the stack Push
  22. 22. User-Defined Data Structures www.edureka.co/python 1 2 3 • This is the pop operation where the data is deleted from the stack TOP Pop
  23. 23. Queues User-Defined Data Structures www.edureka.co/python • Queues are made from arrays • Queues follow the FIFO principle • Operations can be performed from the front or back of the queue 1 2 3 HEADTAIL
  24. 24. En-Queue User-Defined Data Structures www.edureka.co/python • En-Queue operation is adding elements into the queue 1 2 3 HEADTAIL
  25. 25. User-Defined Data Structures www.edureka.co/python 1 2 3 • En-Queue operation is adding elements into the queue HEAD TAIL En-Queue
  26. 26. User-Defined Data Structures www.edureka.co/python 1 2 3 • En-Queue operation is adding elements into the queue HEAD TAIL En-Queue
  27. 27. User-Defined Data Structures www.edureka.co/python • De-Queue operation is to delete elements from the queue 1 2 3 HEAD TAIL De-Queue
  28. 28. Trees User-Defined Data Structures www.edureka.co/python • Trees are helpful to define hierarchy • The tree starts with the root node and go further down • The last nodes are called as the child nodes Root 1 3 1 2 53
  29. 29. Linked List User-Defined Data Structures www.edureka.co/python • Linked Lists are made up of two fields, the data and the next field • The data field holds data and the next field points to the next node • The first node is called as the head Head Data NEXTData NEXT Data NEXT End
  30. 30. Graphs User-Defined Data Structures www.edureka.co/python • Graphs closely represent real world geographical locations • They have vertices and edges • Can be used to find shortest path and help in finding least cost
  31. 31. www.edureka.co/python

×