Table of Contents¶
Assignments¶
General Introduction¶
Simple Python Data¶
Debugging Interlude 1¶
Python Turtle Graphics¶
Python Modules¶
Functions¶
Selection¶
More About Iteration¶
Strings¶
- Strings Revisited
- A Collection Data Type
- Operations on Strings
- Index Operator: Working with the Characters of a String
- String Methods
- Length
- The Slice Operator
- String Comparison
- Strings are Immutable
- Traversal and the
forLoop: By Item - Traversal and the
forLoop: By Index - Traversal and the
whileLoop - The
inandnot inoperators - The Accumulator Pattern with Strings
- Turtles and Strings and L-Systems
- Looping and Counting
- A
findfunction - Optional parameters
- Character classification
- Summary
- Glossary
- Exercises
Lists¶
- Lists
- List Values
- List Length
- Accessing Elements
- List Membership
- Concatenation and Repetition
- List Slices
- Lists are Mutable
- List Deletion
- Objects and References
- Aliasing
- Cloning Lists
- Repetition and References
- List Methods
- The Return of L-Systems
- Append versus Concatenate
- Lists and
forloops - Using Lists as Parameters
- Pure Functions
- Which is Better?
- Functions that Produce Lists
- List Comprehensions
- Nested Lists
- Strings and Lists
listType Conversion Function- Tuples and Mutability
- Tuple Assignment
- Tuples as Return Values
- Glossary
- Exercises
Files¶
Dictionaries¶
Recursion¶
Classes and Objects - the Basics¶
Classes and Objects - Digging a Little Deeper¶
Labs¶
Appendices¶
Acknowledgements¶
- Copyright Notice
- Preface to the Interactive Edition
- Whats the deal with Logging in?
- How to Contribute
- Acknowledgements
- Foreword
- Preface to the Third Edition
- The Rhodes Local Edition (RLE)
- Preface to the First and Second Editions
- Contributor List
- GNU Free Documentation License
- ADDENDUM: How to use this License for your documents