{"id":105192,"date":"2021-10-13T11:00:00","date_gmt":"2021-10-13T08:00:00","guid":{"rendered":"https:\/\/examples.javacodegeeks.com\/?p=105192"},"modified":"2021-10-22T15:29:33","modified_gmt":"2021-10-22T12:29:33","slug":"data-structures-in-python","status":"publish","type":"post","link":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/","title":{"rendered":"Data Structures in Python"},"content":{"rendered":"<p>Python language has features to support different data structures.  In this tutorial, we will see how to develop python data structures  in detail with examples.<\/p>\n<div class=\"toc\">\n<h3>Table Of Contents<\/h3>\n<dl>\n<dt><a href=\"#overview\">1. Introduction<\/a><\/dt>\n<dt><a href=\"#python\">2.Data Structures in Python<\/a><\/dt>\n<dd>\n<dl>\n<dt><a href=\"#prerequisites\">2.1. Prerequisites<\/a><\/dt>\n<dt><a href=\"#software\">2.2. Download<\/a><\/dt>\n<dt><a href=\"#setup\">2.3. Setup<\/a><\/dt>\n<dt><a href=\"#ide\">2.4.IDE<\/a><\/dt>\n<dt><a href=\"#launch\">2.5. Launching IDE<\/a><\/dt>\n<dt><a href=\"#data\">2.6. Data Structures <\/a><\/dt>\n<dt><a href=\"#pythondata\">2.7. Data Structures in Python<\/a><\/dt>\n<\/dl>\n<\/dd>\n<dt><a href=\"#download\">3. Download the Source Code<\/a><\/dt>\n<\/dl>\n<\/div>\n<p>&nbsp;<\/p>\n<h2 class=\"wp-block-heading\"><a name=\"introduction\"><\/a>1. Introduction<\/h2>\n<p>This is an article about data structures in Python. A data structure is the organization of data to cut down the storage space used and to bring the complexity down while performing different tasks. Data structures are used to handle and perform operations with large amounts of data in various fields, such as database management and internet indexing services.<\/p>\n<h2 class=\"wp-block-heading\" id=\"h-2-data-structures-in-python\"><a name=\"python\"><\/a>2. Data Structures in Python <\/h2>\n<h3 class=\"wp-block-heading\" id=\"h-2-1-prerequisites\"><a name=\"prerequisites\"><\/a>2.1 Prerequisites<\/h3>\n<p>Python 3.6.8 is required on windows or any operating system. Pycharm is needed for python programming.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-2-download\"><a name=\"software\"><\/a>2.2 Download<\/h3>\n<p>Python 3.6.8 can be downloaded from the <a href=\"https:\/\/www.python.org\/downloads\/\">website<\/a>. Pycharm is available at this <a href=\"https:\/\/www.jetbrains.com\/pycharm\/download\">link<\/a>. <\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-3-setup\"><a name=\"setup\"><\/a>2.3 Setup<\/h3>\n<h4 class=\"wp-block-heading\" id=\"h-2-3-1-python-setup\">2.3.1 Python Setup<\/h4>\n<p>To install python, the download package or executable needs to be executed.<\/p>\n<h3 class=\"wp-block-heading\"><a name=\"ide\"><\/a>2.4 IDE<\/h3>\n<h4 class=\"wp-block-heading\">2.4.1 Pycharm Setup<\/h4>\n<p>Pycharm package or installable needs to be executed to install Pycharm.<\/p>\n<h3 class=\"wp-block-heading\"><a name=\"launch\"><\/a>2.5 Launching IDE<\/h3>\n<h4 class=\"wp-block-heading\">2.5.1 Pycharm<\/h4>\n<p>Launch the Pycharm and start creating a pure python project named HelloWorld. The screen shows the project creation.<\/p>\n<figure class=\"wp-block-image is-style-default\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/pycharm_create_project.jpg.webp\" alt=\"python data structures - Pycharm Create project\" class=\"wp-image-99337\"\/><figcaption>Pycharm Create project<\/figcaption><\/figure>\n<p>The project settings are set in the next screen as shown below.<\/p>\n<figure class=\"wp-block-image is-style-default\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/pycharm_set_project.jpg.webp\" alt=\"python data structures - Pycharm Project Settings\" class=\"wp-image-99338\"\/><figcaption>Pycharm Project Settings<\/figcaption><\/figure>\n<p>Pycharm welcome screen comes up shows the progress as indicated below.<\/p>\n<figure class=\"wp-block-image is-style-default\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/Pycharm_project_screen.jpg.webp\" alt=\"python data structures - project view\" class=\"wp-image-99339\"\/><figcaption>Pycharm Project View<\/figcaption><\/figure>\n<p>You can create a Hello.py and execute the python file by selecting the Run menu.<\/p>\n<figure class=\"wp-block-image is-style-default\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/python_hello_file.jpg.webp\" alt=\"python data structures - hello world\" class=\"wp-image-99341\"\/><figcaption>Pycharm Hello World<\/figcaption><\/figure>\n<p>The output message \u201cHello World\u201d is printed when the python file is Run.<\/p>\n<figure class=\"wp-block-image is-style-default\"><img decoding=\"async\" src=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2019\/10\/hello_world.jpg.webp\" alt=\"\" class=\"wp-image-99342\"\/><figcaption>Pycharm Python Execution<\/figcaption><\/figure>\n<h3 class=\"wp-block-heading\" id=\"h-2-6-data-structures\"><a name=\"data\"><\/a>2.6  Data Structures<\/h3>\n<p>First, we will look at the definition of abstract datatypes, classifying data<br \/>structures into  the following types :<\/p>\n<ul class=\"wp-block-list\">\n<li>Linear<\/li>\n<li>Non Linear<\/li>\n<li>Homogeneous<\/li>\n<li>Heterogeneous<\/li>\n<li>Dynamic<\/li>\n<\/ul>\n<p>Lists, Sets, Tuples, and Stacks are linear data structures discussed in this article. Many applications, such as Facebook, Twitter, and Google, use lists and linear data structures. These data structures allow us to organize big data in a sequential and organized manner. They help in cutting downtime and effort.<\/p>\n<p>The tree is the nonlinear data structure presented here. Non-linear data structures are used in cryptography and other areas. A non-linear data structure is a structure in which an element is connected to different elements. They use memory quickly and efficiently. Free contiguous memory is not required for appending new elements. The length of the data structures is not important before appending new elements. A non-linear data structure has different levels and a linear one has one level. The values of the elements are disorganized in a non-linear data structure. The data elements in a non-linear data structure cannot be iterated in one step. The implementation of these data structures is complex in nature.<\/p>\n<h3 class=\"wp-block-heading\" id=\"h-2-7-data-structures-in-python\"><a name=\"pythondata\"><\/a>2.7  Data Structures in Python<\/h3>\n<p>List,Set,Dictionary,Tuple,Stack,queue,Tree,Graph,LinkedList, and Hashmap examples are discussed below.<\/p>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-1-list\">2.7.1  List<\/h4>\n<p>A list is a collection of ordered elements that are used to persist a list of items. Unlike array lists, these can expand and compress dynamically. You can use Lists as a base for other data structures, such as stack and queue. You can also use them to store lists of users, car parts, ingredients, to-do items, and various other such elements. Lists are the common linear data structures used by the developers. They were first introduced in the lisp programming language.<\/p>\n<p><span style=\"text-decoration: underline\"><em>List<\/em><\/span><\/p>\n<pre class=\"brush:java\">Example_List = []\nprint(\"Initial blank Example_List: \")\nprint(Example_List)\n\n\nExample_List.append(1)\nExample_List.append(2)\nExample_List.append(7)\nprint(\"\\nExample_List after Addition of Three elements: \")\nprint(Example_List)\n\n\nfor i in range(1, 4):\n\tExample_List.append(i)\nprint(\"\\nExample_List after Addition of elements from 1-3: \")\nprint(Example_List)\n\n\nExample_List.append((4, 5))\nprint(\"\\nExample_List after Addition of a Tuple: \")\nprint(Example_List)\n\n\nExample_List2 = ['For', 'JavaCodeGeeks']\nExample_List.append(Example_List2)\nprint(\"\\nExample_List after Addition of a Example_List: \")\nprint(Example_List)\n\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 ExampleList.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_List.py \nInitial blank Example_List: \n[]\n\nExample_List after Addition of Three elements: \n[1, 2, 7]\n\nExample_List after Addition of elements from 1-3: \n[1, 2, 7, 1, 2, 3]\n\nExample_List after Addition of a Tuple: \n[1, 2, 7, 1, 2, 3, (4, 5)]\n\nExample_List after Addition of a Example_List: \n[1, 2, 7, 1, 2, 3, (4, 5), ['For', 'JavaCodeGeeks']]\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-2-set\">2.7.2 Set<\/h4>\n<p>A Set is a linear data structure that has a collection of values that are unique. A set can<br \/>store unique values without any order. In the real world, sets can be used to collect all tags for blog articles and chat conversations. The data can be of Boolean, integer, float, characters, and other data types. Static sets allow only query methods, which means operations related to querying the set. Dynamic and mutable sets allow<br \/>the addition and deletion of elements in the set. Algebraic operations such as union, intersection, difference, and subset can be defined as methods on the sets.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p><span style=\"text-decoration: underline\"><em>Set<\/em><\/span><\/p>\n<pre class=\"brush:java\">Example_Set = set()\nprint(\"Initial empty Set: \")\nprint(Example_Set)\n\n\nExample_Set.add(1)\nExample_Set.add(2)\nExample_Set.add((3,4))\nprint(\"\\nSet has these elements after Addition of Three elements: \")\nprint(Example_Set)\n\n\nfor i in range(1, 7):\n\tExample_Set.add(i)\nprint(\"\\nSet has these elements after Addition of elements from 1-6: \")\nprint(Example_Set)\n\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Set.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Set.py\nInitial empty Set: \nset()\n\nSet has these elements after Addition of Three elements: \n{1, 2, (3, 4)}\n\nSet has these elements after Addition of elements from 1-6: \n{1, 2, 3, 4, (3, 4), 5, 6}\napples-MacBook-Air:python_data_structures bhagvan.kommadi$\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-3-dictionary\">2.7.3 Dictionary<\/h4>\n<p>A dictionary is a collection of unique key and value pairs. You can use this data structure for storing a set of data items. It has a key, and each key has one item associated with it. When given a key, the dictionary will restore the item related to that key. These keys can be of any data type: strings, integers, or objects. Where we need to sort  a list, an element value can be found using its key. Add, remove, modify, and lookup operations are possible on this collection. A dictionary is similar to other data structures, such as hash function and hashmap. The key\/value store is used in distributed caching and in-memory databases.  Dictionary data structures are used in the following streams like Phone directories, Router tables in networking, Pagetables in operating systems, Symbol tables in compilers, and Genome maps in biology.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Dictionary <\/em><\/span><\/p>\n<pre class=\"brush:java\">Example_Dict = {}\nprint(\"Empty Example_Dictionary: \")\nprint(Example_Dict)\n\nExample_Dict[0] = 'JavaCodeGeeks'\nExample_Dict[2] = 'Like'\nExample_Dict[3] = 2\nprint(\"\\nExample_Dictionary will be like below after adding 3 elements: \")\nprint(Example_Dict)\n\nExample_Dict['Value_set'] = 4, 5, 7\nprint(\"\\nExample_Dictionary will be like below after adding 3 elements: \")\nprint(Example_Dict)\n\nExample_Dict[2] = 'Hello'\nprint(\"\\nUpdated key value for second element: \")\nprint(Example_Dict)\n\nExample_Dict[5] = {'Nested_Dict' :{'1' : 'Jack', '2' : 'King'}}\nprint(\"\\nAdding a Nested Key dictionary will be: \")\nprint(Example_Dict)\n\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Dict.py \n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Dict.py \nEmpty Example_Dictionary: \n{}\n\nExample_Dictionary will be like below after adding 3 elements: \n{0: 'JavaCodeGeeks', 2: 'Like', 3: 2}\n\nExample_Dictionary will be like below after adding 3 elements: \n{0: 'JavaCodeGeeks', 2: 'Like', 3: 2, 'Value_set': (4, 5, 7)}\n\nUpdated key value for second element: \n{0: 'JavaCodeGeeks', 2: 'Hello', 3: 2, 'Value_set': (4, 5, 7)}\n\nAdding a Nested Key dictionary will be: \n{0: 'JavaCodeGeeks', 2: 'Hello', 3: 2, 'Value_set': (4, 5, 7), 5: {'Nested_Dict': {'1': 'Jack', '2': 'King'}}}\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-4-tuple\">2.7.4 Tuple<\/h4>\n<p>Tuples are finite ordered sequences of elements that are objects. They have a combination of other data<br \/>types and are used to group related data into a data structure. In an RDBMS, a tuple is a row of a table. Tuples have a fixed size compared to lists and perform better. A finite set of tuples in the relational database is called as a relation instance. A tuple can be assigned in a single statement. You can use tuples for swapping values. Lists usually have values of the same data type, while tuples can have different data.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Tuple<\/em><\/span><\/p>\n<pre class=\"brush:java\">Example_Tuple1 = (3, 'Hello', 4, 'Java Code Geeks')\nprint(\"\\nTuple with combination of different Datatypes: \")\nprint(Example_Tuple1)\n\nExample_Tuple1 = (2, 1, 4, 7)\nExample_Tuple2 = ('java', 'java code geek')\nExample_Tuple3 = (Example_Tuple1, Example_Tuple2)\nprint(\"\\nTuple which is nested tuples: \")\nprint(Example_Tuple3)\n\nExample_Tuple1 = ('Java Code Geeks',) * 4\nprint(\"\\nTuple after 4 repetitions: \")\nprint(Example_Tuple1)\n\nExample_Tuple1 = ('Java Code Geeks')\nn = 7\nprint(\"\\nTuple consisting of elements in a loop\")\nfor i in range(int(n)):\n\tExample_Tuple1 = (Example_Tuple1,)\n\tprint(Example_Tuple1)\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Tuples.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Tuples.py \n\nTuple with combination of different Datatypes: \n(3, 'Hello', 4, 'Java Code Geeks')\n\nTuple which is nested tuples: \n((2, 1, 4, 7), ('java', 'java code geek'))\n\nTuple after 4 repetitions: \n('Java Code Geeks', 'Java Code Geeks', 'Java Code Geeks', 'Java Code Geeks')\n\nTuple consisting of elements in a loop\n('Java Code Geeks',)\n(('Java Code Geeks',),)\n((('Java Code Geeks',),),)\n(((('Java Code Geeks',),),),)\n((((('Java Code Geeks',),),),),)\n(((((('Java Code Geeks',),),),),),)\n((((((('Java Code Geeks',),),),),),),)\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-5-stack\">2.7.5 Stack<\/h4>\n<p>A <code>stack<\/code> is a last-in, first-out,  data structure. You can add items from the top. Stacks are used in parsers and maze puzzles. Push, pop, top, and get size are the methods allowed on stack data structures. You can use stacks in the use cases such as Syntax parsing, backtracking, compiling, and memory management.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Stack<\/em><\/span><\/p>\n<pre class=\"brush:java\">class ExampleStack:\n   def __init__(self):\n      self.stack = []\n\n   def addElement(self, dataval):\n      if dataval not in self.stack:\n         self.stack.append(dataval)\n         return True\n      else:\n         return False\n        \n   def removeElement(self):\n      if len(self.stack) &lt;= 0:\n         return (\"No element is there in the Stack\")\n      else:\n         return self.stack.pop()\n\nStack = ExampleStack()\nStack.addElement(\"Jan\")\nStack.addElement(\"Feb\")\nStack.addElement(\"Mar\")\nStack.addElement(\"Apr\")\nStack.addElement(\"May\")\nprint(Stack.removeElement())\nprint(Stack.removeElement())\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Stack.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Stack.py \nMay\nApr\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-6-queue\">2.7.6 Queue<\/h4>\n<p>A <code>queue<\/code> has elements to be processed in a specific order or based on priority. Methods such as enqueue, dequeue, and peek can be executed on Queue. A Queue is a linear data structure and a sequential collection. Elements are appended to the end and are removed from the start of the queue. You can use Queues for storing tasks that need to be done, or incoming HTTP requests to be processed by the webserver. You can use queues for handling interruptions in real-time systems, call handling, and CPU task scheduling.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Queue<\/em><\/span><\/p>\n<pre class=\"brush:java\">class ExampleQueue:\n   def __init__(self):\n      self.queue = list()\n\n   def addtoqueue(self,dataval):\n      if dataval not in self.queue:\n       self.queue.insert(0,dataval)\n       return True\n      return False\n\n   def removefromqueue(self):\n      if len(self.queue)&gt;0:\n         return self.queue.pop()\n      return (\"No elements are there in Queue!\")\n\nQueue = ExampleQueue()\nQueue.addtoqueue(\"Jack\")\nQueue.addtoqueue(\"George\")\nQueue.addtoqueue(\"John\")\nQueue.addtoqueue(\"Kate\")\nprint(Queue.removefromqueue())\nprint(Queue.removefromqueue())\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Queue.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Queue.py\nJack\nGeorge\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-7-tree\">2.7.7 Tree<\/h4>\n<p>A tree is a nonlinear data structure. You can use Trees for search and other scenarios. A binary search tree has nodes that have a maximum of two descendants. A binary search tree consists of nodes where the property values of the left node are less than the property values of the right node.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Tree<\/em><\/span><\/p>\n<pre class=\"brush:java\">class ExampleNode:\n   def __init__(self, data):\n      self.left = None\n      self.right = None\n      self.data = data\n\n   def insertNode(self, data):\n      if self.data:\n         if data  self.data:\n               if self.right is None:\n                  self.right = ExampleNode(data)\n               else:\n                  self.right.insertNode(data)\n         else:\n              self.data = data\n   def findbyvalue(self, lkpval):\n      if lkpval  self.data:\n            if self.right is None:\n               return str(lkpval)+\"element Not Found\"\n            return self.right.findbyvalue(lkpval)\n      else:\n            print(str(self.data) + ' is found here')\n\n   def PrintExampleTree(self):\n      if self.left:\n         self.left.PrintExampleTree()\n      print( self.data),\n      if self.right:\n         self.right.PrintExampleTree()\nrootNode = ExampleNode(2)\nrootNode.insertNode(7)\nrootNode.insertNode(15)\nrootNode.insertNode(4)\nprint(rootNode.findbyvalue(5))\nprint(rootNode.findbyvalue(15))\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Tree.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Tree.py\n5element Not Found\n15 is found here\nNone\napples-MacBook-Air:python_data_structures bhagvan.kommadi$\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-8-graph\">2.7.8 Graph<\/h4>\n<p>A graph is a group of objects that are connected by links. The links connect vertices\/points. The basic methods on a graph are the appending and deletion of links and vertices. These are some different types of graphs such as Directed graph,Non-directed graph, Connected graph, Non-connected graph, Simple graph, and Multi-graph.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Graph<\/em><\/span><\/p>\n<pre class=\"brush:java\">class ExampleGraph:\n   def __init__(self,graphdict=None):\n      if graphdict is None:\n         graphdict = {}\n      self.graphdict = graphdict\n   def getPoints(self):\n      return list(self.graphdict.keys())\n      \n   def addPoint(self, point):\n      if point not in self.graphdict:\n         self.graphdict[point] = []\n\negraph_elements = { \n   \"a\" : [\"b\",\"c\"],\n   \"b\" : [\"a\", \"d\"],\n   \"c\" : [\"a\", \"d\"],\n   \"d\" : [\"e\"],\n   \"e\" : [\"d\"],\n   \"f\" : [\"e\"]\n}\ngraph = ExampleGraph(egraph_elements)\ngraph.addPoint(\"g\")\nprint(graph.getPoints())\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Graph.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Graph.py\n['a', 'b', 'c', 'd', 'e', 'f', 'g']\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-9-linkedlist\">2.7.9 LinkedList<\/h4>\n<p>LinkedList is a sequence of node elements that have properties and a reference to the next node element in the order. It is a linear data structure that is used to persist data in the memory . The data structure permits the appending and removal of components from any node next to another node. They are not persisted contiguously in memory, which makes them different arrays.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Linked List<\/em><\/span><\/p>\n<pre class=\"brush:java\">class ExampleNode:\n   def __init__(self, dataval=None):\n      self.dataval = dataval\n      self.nextval = None\n\nclass ExampleLinkedList:\n   def __init__(self):\n      self.headval = None\n\n   def printList(self):\n      printval = self.headval\n      while printval is not None:\n         print (printval.dataval)\n         printval = printval.nextval\n   def AddAtStart(self,newdata):\n      NewNode = ExampleNode(newdata)\n      NewNode.nextval = self.headval\n      self.headval = NewNode\n\nlist = ExampleLinkedList()\nlist.headval = ExampleNode(\"Jan\")\nenode2 = ExampleNode(\"Feb\")\nenode3 = ExampleNode(\"Mar\")\n\nlist.headval.nextval = enode2\nenode2.nextval = enode3\n\nlist.AddAtStart(\"Dec\")\nlist.printList()\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_LinkedList.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_LinkedList.py\nDec\nJan\nFeb\nMar\n<\/pre>\n<h4 class=\"wp-block-heading\" id=\"h-2-7-10-hashmap\">2.7.10 Hashmap<\/h4>\n<p>Hash maps are indexed data structures. A hash map uses a&nbsp;hash function&nbsp;to calculate an index with a key into an array of buckets or slots. Its value is mapped to the bucket with the respective index. The key is unique and immutable.  A hash map is like a cabinet having drawers with labels for the things stored in them. For example, storing user information-  you can use email as the key, and you can map values corresponding to that user such as the first name, last name, etc to a bucket. &nbsp;<\/p>\n<p>A hash function is the core of implementing a hash map. It takes in the key and decodes it to the index of a bucket in the bucket list. Ideal hashing should produce a different index for each key. Sometimes, collisions can occur. When hashing gives an existing index, you can use a bucket for multiple values by appending a list or by rehashing.<\/p>\n<p><span style=\"text-decoration: underline\"><em>Hashmap<\/em><\/span><\/p>\n<pre class=\"brush:java\">class ExampleHashMap:\n\n\n\tdef __init__(self, size):\n\t\tself.size = size\n\t\tself.hash_table = self.create_buckets()\n\n\tdef create_buckets(self):\n\t\treturn [[] for _ in range(self.size)]\n\n\n\tdef set_value(self, key, val):\n\t\t\n\n\t\thashed_key = hash(key) % self.size\n\t\t\n\n\t\tbucket = self.hash_table[hashed_key]\n\n\t\tfound_key = False\n\t\tfor index, record in enumerate(bucket):\n\t\t\trecord_key, record_val = record\n\t\t\t\n\t\t\tif record_key == key:\n\t\t\t\tfound_key = True\n\t\t\t\tbreak\n\n\t\tif found_key:\n\t\t\tbucket[index] = (key, val)\n\t\telse:\n\t\t\tbucket.append((key, val))\n\n\n\tdef get_value(self, key):\n\t\t\n\n\t\thashed_key = hash(key) % self.size\n\t\t\n\t\tbucket = self.hash_table[hashed_key]\n\n\t\tfound_key = False\n\t\tfor index, record in enumerate(bucket):\n\t\t\trecord_key, record_val = record\n\t\t\t\n\t\t\tif record_key == key:\n\t\t\t\tfound_key = True\n\t\t\t\tbreak\n\n\n\t\tif found_key:\n\t\t\treturn record_val\n\t\telse:\n\t\t\treturn \"No record is found\"\n\n\n\tdef delete_value(self, key):\n\t\t\n\n\t\thashed_key = hash(key) % self.size\n\t\t\n\n\t\tbucket = self.hash_table[hashed_key]\n\n\t\tfound_key = False\n\t\tfor index, record in enumerate(bucket):\n\t\t\trecord_key, record_val = record\n\t\t\t\n\t\t\tif record_key == key:\n\t\t\t\tfound_key = True\n\t\t\t\tbreak\n\t\tif found_key:\n\t\t\tbucket.pop(index)\n\t\treturn\n\n\n\tdef __str__(self):\n\t\treturn \"\".join(str(item) for item in self.hash_table)\n\n\nhash_map = ExampleHashMap(30)\n\nhash_map.set_value('george@gmail.com', 'x1')\nprint(hash_map)\nprint()\n\nhash_map.set_value('jack@gmail.com', 'y1')\nprint(hash_map)\nprint()\n\nprint(hash_map.get_value('jack@gmail.com'))\nprint()\n\nhash_map.delete_value('jack@gmail.com')\nprint(hash_map)\n\n<\/pre>\n<p>You can compile the code by using the command below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Compilation Command<\/em><\/span><\/p>\n<pre class=\"brush:plain\">python3 Example_Hashmap.py\n<\/pre>\n<p>The output of the code executed is attached below:<\/p>\n<p><span style=\"text-decoration: underline\"><em>Execution Output<\/em><\/span><\/p>\n<pre class=\"brush:plain\">apples-MacBook-Air:python_data_structures bhagvan.kommadi$ python3 Example_Hashmap.py\n[][][][][][][][][][][][][][][][][][][][][][][][][][('george@gmail.com', 'x1')][][][][]\n\n[][][][('jack@gmail.com', 'y1')][][][][][][][][][][][][][][][][][][][][][][('george@gmail.com', 'x1')][][][][]\n\ny1\n\n[][][][][][][][][][][][][][][][][][][][][][][][][][('george@gmail.com', 'x1')][][][][]\napples-MacBook-Air:python_data_structures bhagvan.kommadi$ \n<\/pre>\n<h2 class=\"wp-block-heading\" id=\"h-3-download-the-source-code\"><a name=\"download\"><\/a>3. Download the Source Code<\/h2>\n<div class=\"download\"><strong>Download<\/strong><br \/>\nYou can download the full source code of this example here:<a href=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/10\/python_data_structures.zip\"> <strong>Data Structures in Python<\/strong><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Python language has features to support different data structures. In this tutorial, we will see how to develop python data structures in detail with examples. Table Of Contents 1. Introduction 2.Data Structures in Python 2.1. Prerequisites 2.2. Download 2.3. Setup 2.4.IDE 2.5. Launching IDE 2.6. Data Structures 2.7. Data Structures in Python 3. Download the &hellip;<\/p>\n","protected":false},"author":31,"featured_media":99891,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[46689],"tags":[1716],"class_list":["post-105192","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","tag-python"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Data Structures in Python - Java Code Geeks<\/title>\n<meta name=\"description\" content=\"Data structures in Python are used to handle &amp; perform operations with large amounts of data in DB management and internet indexing services.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Data Structures in Python - Java Code Geeks\" \/>\n<meta property=\"og:description\" content=\"Data structures in Python are used to handle &amp; perform operations with large amounts of data in DB management and internet indexing services.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\" \/>\n<meta property=\"og:site_name\" content=\"Examples Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/bhagvank\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-13T08:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-22T12:29:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Bhagvan Kommadi\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@bhaggu\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Bhagvan Kommadi\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\"},\"author\":{\"name\":\"Bhagvan Kommadi\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/4575ae335b8ff016be62c3b927d5d5e6\"},\"headline\":\"Data Structures in Python\",\"datePublished\":\"2021-10-13T08:00:00+00:00\",\"dateModified\":\"2021-10-22T12:29:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\"},\"wordCount\":1639,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"keywords\":[\"python\"],\"articleSection\":[\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\",\"name\":\"Data Structures in Python - Java Code Geeks\",\"isPartOf\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"datePublished\":\"2021-10-13T08:00:00+00:00\",\"dateModified\":\"2021-10-22T12:29:33+00:00\",\"description\":\"Data structures in Python are used to handle & perform operations with large amounts of data in DB management and internet indexing services.\",\"breadcrumb\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"set python\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/examples.javacodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Web Development\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/web-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Python\",\"item\":\"https:\/\/examples.javacodegeeks.com\/category\/web-development\/python\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Data Structures in Python\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#website\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Examples and Code Snippets\",\"publisher\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/examples.javacodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/javacodegeeks\",\"https:\/\/x.com\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/4575ae335b8ff016be62c3b927d5d5e6\",\"name\":\"Bhagvan Kommadi\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2019\/02\/bhagvan.-kommadi-96x96.jpg\",\"contentUrl\":\"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2019\/02\/bhagvan.-kommadi-96x96.jpg\",\"caption\":\"Bhagvan Kommadi\"},\"description\":\"Bhagvan Kommadi is the Founder of Architect Corner &amp; has around 20 years\u2019 experience in the industry, ranging from large scale enterprise development to helping incubate software product start-ups. He has done Masters in Industrial Systems Engineering at Georgia Institute of Technology (1997) and Bachelors in Aerospace Engineering from Indian Institute of Technology, Madras (1993). He is member of IFX forum,Oracle JCP and participant in Java Community Process. He founded Quantica Computacao, the first quantum computing startup in India. Markets and Markets have positioned Quantica Computacao in \u2018Emerging Companies\u2019 section of Quantum Computing quadrants. Bhagvan has engineered and developed simulators and tools in the area of quantum technology using IBM Q, Microsoft Q# and Google QScript. He has reviewed the Manning book titled : \\\"Machine Learning with TensorFlow\u201d. He is also the author of Packt Publishing book - \\\"Hands-On Data Structures and Algorithms with Go\\\".He is member of IFX forum,Oracle JCP and participant in Java Community Process. He is member of the MIT Technology Review Global Panel.\",\"sameAs\":[\"http:\/\/www.architectcorner.com\",\"https:\/\/www.facebook.com\/bhagvank\",\"https:\/\/in.linkedin.com\/pub\/bhagvan-kommadi\/0\/3a6\/b46\",\"https:\/\/x.com\/bhaggu\"],\"url\":\"https:\/\/examples.javacodegeeks.com\/author\/bhagvan-kommadi\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Data Structures in Python - Java Code Geeks","description":"Data structures in Python are used to handle & perform operations with large amounts of data in DB management and internet indexing services.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/","og_locale":"en_US","og_type":"article","og_title":"Data Structures in Python - Java Code Geeks","og_description":"Data structures in Python are used to handle & perform operations with large amounts of data in DB management and internet indexing services.","og_url":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/","og_site_name":"Examples Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_author":"https:\/\/www.facebook.com\/bhagvank","article_published_time":"2021-10-13T08:00:00+00:00","article_modified_time":"2021-10-22T12:29:33+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","type":"image\/jpeg"}],"author":"Bhagvan Kommadi","twitter_card":"summary_large_image","twitter_creator":"@bhaggu","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Bhagvan Kommadi","Est. reading time":"13 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#article","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/"},"author":{"name":"Bhagvan Kommadi","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/4575ae335b8ff016be62c3b927d5d5e6"},"headline":"Data Structures in Python","datePublished":"2021-10-13T08:00:00+00:00","dateModified":"2021-10-22T12:29:33+00:00","mainEntityOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/"},"wordCount":1639,"commentCount":0,"publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","keywords":["python"],"articleSection":["Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/","url":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/","name":"Data Structures in Python - Java Code Geeks","isPartOf":{"@id":"https:\/\/examples.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage"},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage"},"thumbnailUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","datePublished":"2021-10-13T08:00:00+00:00","dateModified":"2021-10-22T12:29:33+00:00","description":"Data structures in Python are used to handle & perform operations with large amounts of data in DB management and internet indexing services.","breadcrumb":{"@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#primaryimage","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2021\/02\/python-logo.jpg","width":150,"height":150,"caption":"set python"},{"@type":"BreadcrumbList","@id":"https:\/\/examples.javacodegeeks.com\/data-structures-in-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/examples.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Web Development","item":"https:\/\/examples.javacodegeeks.com\/category\/web-development\/"},{"@type":"ListItem","position":3,"name":"Python","item":"https:\/\/examples.javacodegeeks.com\/category\/web-development\/python\/"},{"@type":"ListItem","position":4,"name":"Data Structures in Python"}]},{"@type":"WebSite","@id":"https:\/\/examples.javacodegeeks.com\/#website","url":"https:\/\/examples.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Examples and Code Snippets","publisher":{"@id":"https:\/\/examples.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/examples.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/examples.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/examples.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/4575ae335b8ff016be62c3b927d5d5e6","name":"Bhagvan Kommadi","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/examples.javacodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2019\/02\/bhagvan.-kommadi-96x96.jpg","contentUrl":"https:\/\/examples.javacodegeeks.com\/wp-content\/uploads\/2019\/02\/bhagvan.-kommadi-96x96.jpg","caption":"Bhagvan Kommadi"},"description":"Bhagvan Kommadi is the Founder of Architect Corner &amp; has around 20 years\u2019 experience in the industry, ranging from large scale enterprise development to helping incubate software product start-ups. He has done Masters in Industrial Systems Engineering at Georgia Institute of Technology (1997) and Bachelors in Aerospace Engineering from Indian Institute of Technology, Madras (1993). He is member of IFX forum,Oracle JCP and participant in Java Community Process. He founded Quantica Computacao, the first quantum computing startup in India. Markets and Markets have positioned Quantica Computacao in \u2018Emerging Companies\u2019 section of Quantum Computing quadrants. Bhagvan has engineered and developed simulators and tools in the area of quantum technology using IBM Q, Microsoft Q# and Google QScript. He has reviewed the Manning book titled : \"Machine Learning with TensorFlow\u201d. He is also the author of Packt Publishing book - \"Hands-On Data Structures and Algorithms with Go\".He is member of IFX forum,Oracle JCP and participant in Java Community Process. He is member of the MIT Technology Review Global Panel.","sameAs":["http:\/\/www.architectcorner.com","https:\/\/www.facebook.com\/bhagvank","https:\/\/in.linkedin.com\/pub\/bhagvan-kommadi\/0\/3a6\/b46","https:\/\/x.com\/bhaggu"],"url":"https:\/\/examples.javacodegeeks.com\/author\/bhagvan-kommadi\/"}]}},"_links":{"self":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/105192","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/users\/31"}],"replies":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=105192"}],"version-history":[{"count":0,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/105192\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media\/99891"}],"wp:attachment":[{"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=105192"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=105192"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/examples.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=105192"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}