ptg20573278
ptg20573278
LEARN PYTHON 3
THE HARD WAY
ptg20573278
Z
ed Shaw’s Hard Way Series emphasizes instruction and making things as
the best way to get started in many computer science topics. Each book in the
series is designed around short, understandable exercises that take you through a
course of instruction that creates working software. All exercises are thoroughly
tested to verify they work with real students, thus increasing your chance of
success. The accompanying video walks you through the code in each exercise.
Zed adds a bit of humor and inside jokes to make you laugh while you’re learning.
Visit informit.com/hardway for a complete list of available publications.
Make sure to connect with us!
informit.com/socialconnect
Zed Shaw’s Hard Way Series
ptg20573278
LEARN PYTHON 3
THE HARD WAY
A Very Simple Introduction
to the Terrifyingly Beautiful World
of Computers and Code
Zed A. Shaw
Boston • Columbus • Indianapolis • New York • San Francisco • Amsterdam • Cape Town
Dubai • London • Madrid • Milan • Munich • Paris • Montreal • Toronto • Delhi • Mexico City
São Paulo • Sydney • Hong Kong • Seoul • Singapore • Taipei • Tokyo
ptg20573278
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks.
Where those designations appear in this book, and the publisher was aware of a trademark claim, the designations
have been printed with initial capital letters or in all capitals.
The author and publisher have taken care in the preparation of this book, but make no expressed or implied warranty
of any kind and assume no responsibility for errors or omissions. No liability is assumed for incidental or
consequential damages in connection with or arising out of the use of the information or programs contained herein.
For information about buying this title in bulk quantities, or for special sales opportunities (which may include
electronic versions; custom cover designs; and content particular to your business, training goals, marketing focus, or
branding interests), please contact our corporate sales department at corpsales@pearsoned.com or (800) 382-3419.
For government sales inquiries, please contact governmentsales@pearsoned.com.
For questions about sales outside the U.S., please contact intlcs@pearson.com.
Visit us on the Web: informit.com/aw
Library of Congress Control Number: 2017940290
Copyright © 2017 Zed A. Shaw
All rights reserved. Printed in the United States of America. This publication is protected by copyright, and
permission must be obtained from the publisher prior to any prohibited reproduction, storage in a retrieval system,
or transmission in any form or by any means, electronic, mechanical, photocopying, recording, or likewise. For
information regarding permissions, request forms and the appropriate contacts within the Pearson Education Global
Rights & Permissions Department, please visit www.pearsoned.com/permissions/.
ISBN-13: 978-0-13-469288-3
ISBN-10: 0-13-469288-8
2 17