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

Mapa mental

Basic Python Data Structures

Takarada RikkAA Inglês

Conteúdo do mapa

Basic Python Data Structures

  1. List

    • One of 4 built-in date sturcture
      • Changable
        • We can change the variable in side a List after the List has been defined
      • Ordered
        • Variable in List is well-ordered, which means, we can retrieve the variable by the order
        • a_list = ["a", "a", "b", "c" ] print(a_list[0]) will print "a"
      • Allow Duplicate element
        • We can add duplicate element in List
        • fruit = ["apple", "banana", "cherry", "apple", "cherry"]
    • a_list = ["a", "a", "b", "c" ]
    • Other function
      • len() will return the length of a list
        • thislist = ["a", "b", "c"] print(len(thislist)) will print 3
    • Data Type
      • string
      • int
      • boolean
  2. Tuples

    • a_tuple = ("a", "b", "c")
    • Data Type
      • string
      • int
      • boolean
    • Other function
      • len() will return the length of a list
        • thistuple = ("a", "b", "c") print(len(thislist)) will print 3
    • One of 4 built-in date sturcture
      • Unchangable
        • We cannot change the variable in side a Tuple after the List has been defined
      • Ordered
        • Variable in List is well-ordered, which means, we can retrieve the variable by the order
        • a_tuple = ("a", "a", "b", "c" ) print(a_tuple[0]) will print "a"
      • Allow Duplicate element
        • We can define duplicate element in Tuple
        • fruit = ("apple", "banana", "cherry", "apple", "cherry")
  3. Sets

    • a_set = {"a", "b", "c"}
    • One of 4 built-in date sturcture
      • Unordered
        • Unordered means that the items in a set do not have a defined order.
          • Python will print the element in a set in random order
      • Unchangable
        • We cannot change the element after a set is defined
        • But we can add new element
      • Not allow duplicate element
        • We cannot add duplicate element in Set
        • fruit = {"apple", "banana", "cherry", "apple", "cherry"} print(fruit)
          • {apple, banana, cherry}
    • Other function
      • len() will return the length of a list
        • thisset = {"a", "b", "c"} print(len(thislist)) will print 3
    • Data Type
      • int
      • boolean
      • string
  4. Dictionaries

    • a_dict = {'name': 'Alexander', 'age': 35, 'sex': 'male', 'income': 1500}
    • Data Type
      • int
      • boolean
      • string
    • Other function
      • len() will print out the length of a dictonary
    • One of 4 built-in date sturcture
      • Changable
        • We can add, delete, or modify the element in dictonary
      • Orded*
        • Dictonary is an ordered Data Type and the order will not be changed
        • Unordered before Python 3.6
      • NOT allow the duplicate elements
        • Dictonary and not have two item with the same key
    • dict = {'a_key': 'some_variable'}

Informações

Descrição
Mapa Mental sobre Basic Python Data Structures, criado por Takarada RikkAA em 13-09-2021.
Criado por
Takarada RikkAA
Visualizações
0
Avaliação

Fale Conosco

Sobre o que é sua mensagem?

O que você acha do novo visual?

Você gostou?