Outline for February 8, 2012

Reading: §8, 11

  1. String module import string
    1. String methods: s.capitalize(), s.replace(old, new), s.find(sub), s.rfind(sub), s.upper(), s.lower()
  2. Example [str_array.py]
  3. Lists
    1. Sequence of values (ints, floats, strings, other lists, etc.)
    2. Denoted by square brackets [ ] with values separated by commas
    3. Lists are mutable
    4. How to create a list
  4. Type conversion
    1. str(val) attempts to convert val to a string
    2. list(sequence) attempts to convert sequence to a list

A PDF version is available here.
ECS 10, Basic Concepts of Computing
Winter Quarter 2012