GoConqr has a new look! Let us know what you think.

Mind map

Four Basic Data Structures

Samuel Licht English

Map content

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

Information

Description
Mind Map on Four Basic Data Structures, created by Samuel Licht on 03/02/2021.
Created by
Samuel Licht
Views
0
Rating

Feedback

What is it about?

What do you think of the new look?

How do you like it?