¡GoConqr estrena diseño! Cuéntanos qué te parece.

Mapa mental

Basic Data Structures

Claire Layton Inglés

Contenido del mapa

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)

Información

Descripción
Mapa Mental sobre Basic Data Structures, creado por Claire Layton el 25/01/2021.
Creado por
Claire Layton
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?