About the author of "Learning Python"
Mark is the author of three books O'Reilly Learning Python, Programming Python, and Python Pocket Reference, all currently in fourth or fifth editions. He has been using and promoting Python since 1992, started writing Python books in 1995, and started teaching Python courses in 1997. At the end of 2018, Mark had: Taught 260 live, in-person Python courses to approximately 4,000 students, in a training career that spanned both continents and decades.
Wrote 14 Python books that have sold over 650,000 units, cover 11,000 published pages, cover Pythons 1.X to 3.X and have been translated into at least a dozen languages
Get a comprehensive, in-depth introduction to the core language of Python with this hands-on book. Based on author Mark Lutz's popular training course, this updated fifth edition will help you write high-quality, efficient code with Python. It's an ideal way to get started, whether you're new to programming or a professional developer versed in other languages.
Complete with helpful quizzes, exercises, and illustrations, this easy-to-follow, self-paced tutorial is an introduction to Python 2.7 and 3.3 - the latest releases in the 3.X and 2.X lines - in addition to all the other releases in common use today. You'll also learn some advanced language features that have recently become more common in Python code.
Chapter 9 Intro
This chapter rounds out our in-depth tour of the core object types in Python by exploring the tuple, a collection of other objects that cannot be changed, and the file, an interface to external files on your computer. As you’ll see, the tuple is a relatively simple object that largely performs operations you’ve already learned about for strings and lists. The file object is a commonly used and full-featured tool for processing files on your computer. Because files are so pervasive in programming, the basic overview of files here is supplemented by larger examples in later chapters.
This chapter also concludes this part of the book by looking at properties common to all the core object types we’ve met—the notions of equality, comparisons, object copies, and so on. We’ll also briefly explore other object types in Python’s toolbox, including the None placeholder and the named tuple hybrid; as you’ll see, although we’ve covered all the primary built-in types, the object story in Python is broader than I’ve implied thus far. Finally, we’ll close this part of the book by taking a look at a set of common object type pitfalls and exploring some exercises that will allow you to experiment with the ideas you’ve learned.