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

Mapa mental

Four Basic Data Structures

Samuel Licht Inglés

Contenido del mapa

Four Basic Data Structures

  1. Lists

    • [...,...,...]
    • ordered, changeable, allow for duplicates
    • can have multiple data types
    • append a list use: mylist.append('what i am addind')
    • remove an element use: mylist.pop(3)
    • To access an element in a list use: item=myList[2]
  2. Sets

    • unordered, unchangeable,+ reject duplicate
    • {...,...,...}
    • elements with different data types
    • can't use indices to access sets but can loop to see the names in the set
    • you can also check if an element is in a set using the print function: it returns a true or false response
    • add elements using .add
    • merge sets by using .update
  3. Tuples

    • (...,...,...)
    • used to store multiple items in a single variable
    • Ordered, unchangeable, and allow for duplicates
    • access and item: item=myTuple[2]
    • myTuple[-1] :returns the last item
    • myTuple[1:3] will return a subtuple
  4. Dictionaries

    • {key1: value1, ... : ... }
    • used to store data in key: value format
    • these are very powerful structures to describe items
    • values can be any data type

Información

Descripción
Mapa Mental sobre Four Basic Data Structures, creado por Samuel Licht el 03/02/2021.
Creado por
Samuel Licht
Visitas
0
Valoración

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?