Have a personal or library account? Click to login
Python Essentials Cover

Python Essentials

Modernize existing Python code and plan code migrations to Python using this definitive guide

Paid access
|Sep 2025
Product purchase options

Key Features

    Book Description

    This book is designed for Python 2 developers who want to get to grips with Python 3 in a short period of time. It covers the key features of Python, assuming you are familiar with the fundamentals of Python 2.

    What you will learn

    • Use Python interactively and master the art of writing efficient Python scripts
    • Learn techniques for working with string data, including how to use regular expressions to parse strings
    • Get to know how the shortcircuit and ifelse logic operators work
    • Explore mutable data structures including list, set, and dict
    • Define functions with positional and optional parameters, and learn to use keyword argument values when calling a function
    • Write generator functions, generator expressions, and comprehensions
    • Master the use of exceptions for handling errors and other unexpected conditions
    • Understand the importance of working with files, context manager, and the with statement

    Who this book is for

    Table of Contents

    1. Getting Started
    2. Simple Data Types
    3. Expressions and Output
    4. Variables, Assignment and Scoping Rules
    5. Logic, Comparisons, Conditions
    6. More Complex Data Types
    7. Basic Function Definition
    8. More Advanced Python Functions
    9. Exceptions
    10. Files, Databases, Networks, and Contexts
    11. Class Definitions
    12. Scripts, Modules, Packages, Libraries, and Applications
    13. Metaprogramming and Decorators
    14. Fit and Finish: Unit Testing, Packaging, and Documentation
    15. Next Steps
    https://github.com/packtpublishing/python-essentials
    PDF ISBN: 978-1-78439-814-9
    Publisher: Packt Publishing Limited
    Copyright owner: © 2015 Packt Publishing Limited
    Publication date: 2025
    Language: English
    Pages: 298