,Think Python
THIRD EDITION
How To Think Like a Computer Scientist
With Early Release ebooks, you get books in their earliest form—the
author’s raw and unedited content as they write—so you can take advantage
of these technologies long before the official release of these titles.
Allen B. Downey
,Think Python
by Allen B. Downey
Copyright © 2024 Allen Downey. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(https://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
.
Acquisitions Editor: Brian Guerin
Development Editor: Jeff Bleiel
Production Editor: Kristen Brown
Interior Designer: David Futato
Cover Designer: Karen Montgomery
Illustrator: Kate Dullea
, August 2012: First Edition
December 2015: Second Edition
July 2024: Third Edition
Revision History for the Early Release
2023-10-09: First Release
2023-12-18: Second Release
See http://oreilly.com/catalog/errata.csp?isbn=9781098155438 for release
details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Think
Python, the cover image, and related trade dress are trademarks of O’Reilly
Media, Inc.
The views expressed in this work are those of the author and do not
represent the publisher’s views. While the publisher and the author have
used good faith efforts to ensure that the information and instructions
contained in this work are accurate, the publisher and the author disclaim all
responsibility for errors or omissions, including without limitation
responsibility for damages resulting from the use of or reliance on this
work. Use of the information and instructions contained in this work is at
your own risk. If any code samples or other technology this work contains
or describes is subject to open source licenses or the intellectual property
THIRD EDITION
How To Think Like a Computer Scientist
With Early Release ebooks, you get books in their earliest form—the
author’s raw and unedited content as they write—so you can take advantage
of these technologies long before the official release of these titles.
Allen B. Downey
,Think Python
by Allen B. Downey
Copyright © 2024 Allen Downey. All rights reserved.
Printed in the United States of America.
Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North,
Sebastopol, CA 95472.
O’Reilly books may be purchased for educational, business, or sales
promotional use. Online editions are also available for most titles
(https://oreilly.com). For more information, contact our
corporate/institutional sales department: 800-998-9938 or
.
Acquisitions Editor: Brian Guerin
Development Editor: Jeff Bleiel
Production Editor: Kristen Brown
Interior Designer: David Futato
Cover Designer: Karen Montgomery
Illustrator: Kate Dullea
, August 2012: First Edition
December 2015: Second Edition
July 2024: Third Edition
Revision History for the Early Release
2023-10-09: First Release
2023-12-18: Second Release
See http://oreilly.com/catalog/errata.csp?isbn=9781098155438 for release
details.
The O’Reilly logo is a registered trademark of O’Reilly Media, Inc. Think
Python, the cover image, and related trade dress are trademarks of O’Reilly
Media, Inc.
The views expressed in this work are those of the author and do not
represent the publisher’s views. While the publisher and the author have
used good faith efforts to ensure that the information and instructions
contained in this work are accurate, the publisher and the author disclaim all
responsibility for errors or omissions, including without limitation
responsibility for damages resulting from the use of or reliance on this
work. Use of the information and instructions contained in this work is at
your own risk. If any code samples or other technology this work contains
or describes is subject to open source licenses or the intellectual property