GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Mindmap

Basic Data Structures

Claire Layton Englisch

Inhalt der Mindmap

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)

Informationen

Beschreibung
Mindmap am Basic Data Structures, erstellt von Claire Layton am 25/01/2021.
Erstellt von
Claire Layton
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck