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

Mindmap

Four Basic Data Structures

Samuel Licht Englisch

Inhalt der Mindmap

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

Informationen

Beschreibung
Mindmap am Four Basic Data Structures, erstellt von Samuel Licht am 03/02/2021.
Erstellt von
Samuel Licht
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck