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

Mindmap

Linear Data Structures

Madison Miller Computer Science Englisch

Inhalt der Mindmap

Linear Data Structures

  1. Lists

    • Ordered
      • Changeable
        • Allow duplicates
          • Allow many data types (strings, integers, T/F)
    • Syntax [...,...,...]
      • Add to list using listTitle.append
        • Remove first element in list using listTitle.remove
          • Remove specific element in list using listTitle.pop(index) ***index starts at 0***
            • Access element in list using list.Title[]
  2. Tuples

    • Syntax (...,...,...)
      • Must include comma after each element even if there is only one element
        • Access element using tupleTitle[]
          • tupleTitle[-1] returns last item
            • tupleTitle[x:y] gives elements from index x to index y
    • Ordered
      • Unchangeable
        • Allow duplicates
          • Allow many data types (strings, integers, T/F)
  3. Sets

    • Syntax {...,...,...}
      • Use for loop instead of indices to access items in set
        • Check if element exists in set T/F print("x" in setTitle
          • Add elements to set using setTitle.add()
            • Merge two sets using setTitle.update()
    • Unordered
      • Unchangeable
        • No duplicates
          • Allow many data types (strings, integers, T/F)
  4. Dictionaries

    • Syntax (key1:value1,...)
      • To update value: dictionaryTitle["key"]="value"
        • Add new key to dictionary: newKey=dictionaryTitle["value"]
    • Values can be any data type

Informationen

Beschreibung
Computer Science Mindmap am Linear Data Structures, erstellt von Madison Miller am 02/02/2021.
Erstellt von
Madison Miller
Aufrufe
0
Bewertung

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck