Skip to content

x [terminology]

Terminology

Usage

  • Use for a generic numeric element from a sequence.
  • It is especially appropriate in mathematical array algorithms.
  • Prefer a domain name when the element has a meaningful role, such as price, coin, or fruit.
res = [[]]
for x in nums:
    res += [subset + [x] for subset in res]

See 78. Subsets.