1 Matching Annotations
  1. Sep 2020
    1. A tuple is a sequence of values. The values can be any type, and they are indexed byintegers, so in that respect tuples are a lot like lists. The important difference is that tuplesare immutable
      • A tuple is a sequence of values. The values can be any type, and they are indexed by integers, so in that respect tuples are a lot like lists. The important difference is that tuples are immutable.
      • Strictly speaking, a function can only return one value, but if the value is a tuple, the effect is the same as returning multiple values.
      • Dictionaries have a method called items that returns a sequence of tuples, where each tuple is a key-value pair.
      • zip object:The result of calling a built-in function zip; an object that iterates through a sequence of tuples
      • .iterator:An object that can iterate through a sequence, but which does not provide list operators and methods.
      • data structure:A collection of related values, often organized in lists, dictionaries, tuples,