I&C SCI 33 Lecture Notes - Lecture 1: Parsing, Function Object
Document Summary
Open returns an object you can iterate over. The rstrip method (str is not mutable!) Readlines : returns a list of str (each with \n"); space inefficient. Read : one giant str with ( \n" ending lines);space inefficient. The split method: break into lines without \n". Names (in namespaces) are bound to objects. Everything that python computes with is an object (examples: instance/data, function, module, class objects) Every object has its own namespace (a dictionary that binds its internal names to other objects) Python has rules about how things work. Statements are executed to cause an effect. Expressions can be as simple as just 1 . Simplest statement in python which essentially means do nothing . A value (object/instance) of nonetype; it is the only value of that type. Attr-name: attribute name already defined in namespace of module being imported. Import module-name form: imports the names of modules (not attribute names)