Think Python

“Think Python” delves into the fundamental concepts of Python programming, exploring topics like variables, expressions, functions, and control flow. The book aims to guide readers through the process of learning Python by providing clear explanations and practical examples. It covers essential programming principles and techniques, making it suitable for beginners and those looking to solidify their understanding of Python. With a focus on problem-solving and hands-on exercises, “Think Python” offers a structured approach to mastering Python programming concepts.

Chapter 15  Classes and objects

 Think Python

At this point you know how to use functions to organize code and built-in types to organize data. The next step is to learn “object-oriented programming”, which uses programmer-defined types to organi...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 16  Classes and functions

 Think Python

Now that we know how to create new types, the next step is to write functions that take programmer-defined objects as parameters and return them as results. In this chapter I also present “functional ...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 18  Inheritance

 Think Python

The language feature most often associated with object-oriented programming is inheritance . Inheritance is the ability to define a new class that is a modified version of an existing class. In this c...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 19  The Goodies

 Think Python

One of my goals for this book has been to teach you as little Python as possible. When there were two ways to do something, I picked one and avoided mentioning the other. Or sometimes I put the second...

📚 Read more at Think Python
🔎 Find similar documents

Appendix A  Debugging

 Think Python

When you are debugging, you should distinguish among different kinds of errors in order to track them down more quickly: Syntax errors are discovered by the interpreter when it is translating the sour...

📚 Read more at Think Python
🔎 Find similar documents

Index

 Think Python

Ackermann function, 6.11 , 11.10 Archimedian spiral, 4.12 AttributeError, 15.7 , A.2.3 Austen, Jane, 13.3 abecedarian, 8.3 , 9.2 abs function, 6.1 absolute path, 14.4 , 14.11 access, 10.2 accumulator,...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 11  Dictionaries

 Think Python

This chapter presents another built-in type called a dictionary. Dictionaries are one of Python’s best features; they are the building blocks of many efficient and elegant algorithms. 11.1 A dictionar...

📚 Read more at Think Python
🔎 Find similar documents

Appendix B  Analysis of Algorithms

 Think Python

This appendix is an edited excerpt from Think Complexity , by Allen B. Downey, also published by O’Reilly Media (2012). When you are done with this book, you might want to move on to that one. Analysi...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 13  Case study: data structure selection

 Think Python

At this point you have learned about Python’s core data structures, and you have seen some of the algorithms that use them. If you would like to know more about algorithms, this might be a good time t...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 12  Tuples

 Think Python

This chapter presents one more built-in type, the tuple, and then shows how lists, dictionaries, and tuples work together. I also present a useful feature for variable-length argument lists, the gathe...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 14  Files

 Think Python

This chapter introduces the idea of “persistent” programs that keep data in permanent storage, and shows how to use different kinds of permanent storage, like files and databases. 14.1 Persistence Mos...

📚 Read more at Think Python
🔎 Find similar documents

Chapter 17  Classes and methods

 Think Python

Although we are using some of Python’s object-oriented features, the programs from the last two chapters are not really object-oriented because they don’t represent the relationships between programme...

📚 Read more at Think Python
🔎 Find similar documents