I&C SCI 33 Lecture Notes - Lecture 1: Parsing, Function Object

84 views2 pages

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)

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents