O GoConqr está de visual novo! Conte para nós o que você achou.

Mapa mental

DATA STRUCTURES

Danielle Dietz Inglês

Conteúdo do mapa

DATA STRUCTURES

  1. LISTS

    • [...,...,...,...]
    • Changeable, ordered, allow duplicates
    • CAN include elements w different data types
    • Adding a element to a list → place it at the end EX:myList.append
    • When deleting an element from a list → remove or pop EX: myList.remove(“”) OR myList.pop(“”)
    • Access an element in a list, use the square brackets (w placement in list (starts w 0)) Item = myList[2]
  2. TUPLES

    • (...,...,...,)
    • Used to store multiple items in a single variable
    • Ordered, unchangeable, and allow duplicates
  3. SETS

    • Unordered, unchangeable, reject duplicates
    • Elements w different data types
    • mySet - {..,...,...}
    • Don't use indices to access sets BUT can Loop to see their items EX: for x in mySet: print (x)
    • Can also check (TRUE or FALSE) in an element exists in Set EX: print(“banana” in mySet)
    • Can add elements to set using .add(...)
    • Merge sets using .update(...)
  4. DICTIONARIES

    • Store data in key:value format
    • Very powerful structures to describe items
    • Values in dictionary can be of any datatype EX: carOnSale = { “Brand”: “Toyota”, “Year”: 2018, }
    • When printed: {key1:value1, …, …}

Informações

Descrição
Mapa Mental sobre DATA STRUCTURES, criado por Danielle Dietz em 12-09-2021.
Criado por
Danielle Dietz
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?