GoConqr has a new look! Let us know what you think.

Mind map

Basic Data Structures

Claire Layton English

Map content

Basic Data Structures

  1. Tuples

    • • Ordered • Unchangeable • Allows duplicates
      • Example: ("apple", True, "banana", 7)
        • Use square bracket notation with index to access elements in the tuple.
  2. Lists

    • • Ordered • Changeable • Allows duplicates
      • Example: ["apple", True, "banana", 7]
        • Use remove or pop to delete list elements, and use square bracket notation with the index to access an element in a list.
  3. Dictionaries

    • Uses key : value format
      • Example: carOnSale = { "brand" : "Toyota", "model" : "Corolla LE", "year" : 2018 }
        • Values can be of any type. To update a value, give the dictionary with key in brackets. i.e. myDictionary["keyName"] = "newValue". Values can be changed and updates many times.
  4. Sets

    • • Unordered • Unchangeable • Rejects duplicates
      • Example: {"apple", True, "banana", 7}
        • Unordered so cannot be accessed by square bracket notation with index. Instead use a loop to view elements, or check if an element exists in the set by checking True or False. i.e. print( "element" in mySet)

Information

Description
Mind Map on Basic Data Structures, created by Claire Layton on 25/01/2021.
Created by
Claire Layton
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?