Python: List, tuple, set

June 27, 2024

Main topic

  • List[]: square brackets

    • Have order
  • Tuple(): normal brackets (also called parentheses)

    • Can not modify after created
  • Set: curly brace, English grammar? what difference between 'brackets' and 'brace'?

    • There is only method add(), no append(), because set does not keep the order of item list.
    • Have methods: defference(), union(), intersection()

Is there anything else fun today?

I'm back to write this note. I must make it a habbit to do it every day. .

Keywords: List, square brackets, order, tuple, normal brackets, immutable, set, curly braces, add method, unordered, difference, union, intersection.