Yet Another Python Book# Contents 1. Greetings! 1.1. About this Book 1.2. Design Decisions 1.3. Programming 1.4. Assumptions 1.5. Programming Languages 1.6. Takeaways 2. Before We Start 2.1. Instructions 2.2. Values and Types 2.3. True and False 2.4. Binary 2.5. How Computers Work 2.6. Text Files 2.7. Takeaways 3. Getting Stuff Together 3.1. A Note on Operating Systems 3.2. Getting Python 3.3. Choosing and Getting an IDE 3.4. Other Tools 3.5. Takeaways 4. Getting Started 4.1. Three Programs 4.2. Programming in a Good Place 4.3. Takeaways 5. Somewhere to Start 5.1. Creating Values 5.2. Values and Types 5.3. Values and Variables 5.4. Input and Output 5.5. Takeaways 6. When Things Go Wrong 6.1. A Simple Error 6.2. Handling an Exception 6.3. Another Exception 6.4. Exceptions are Good 6.5. More Errors 6.6. Takeaways 7. Staying in Control 7.1. Values in Range 7.2. Flow of Control 7.3. Non-Linear Programs 7.4. Repeating Yourself 7.5. Pulling It Together 7.6. Takeaways 8. The Wheel. Do Not Reinvent 8.1. The Standard Library 8.2. The Python Package Index 8.3. Takeaways 9. Keeping it Simple 9.1. Code is Crafted 9.2. Code Reuse 9.3. Functions Explained 9.4. A Simple Game 9.5. Using Functions 9.6. Takeaways 10. Collecting 10.1. Looking at Lists 10.2. Trying Tuples 10.3. Seeking Sets 10.4. Discovering Dictionaries 10.5. Takeaways 11. Fun with Files 11.1. Finding Files 11.2. Reading Files 11.3. Writing Files 11.4. Takeaways 12. Those Little Details 12.1. Ternary 12.2. F-Strings 12.3. Command-Line Arguments 12.4. None 12.5. Passing 12.6. Custom Exceptions 12.7. List Comprehensions 12.8. Takeaways 13. The End of the Book 13.1. Programming, not Python 13.2. Keep Up To Date 13.3. Keep Sharp 13.4. Important Reading 13.5. AI and Programming 13.6. Takeaways Endmatter: Glossary Colophon Image Credit Credits