Modernize existing Python code and plan code migrations to Python using this definitive guide
Python Essentials provides a vital tour of the most critical features of Python. Starting with setup and installation, you will soon dive into exploring built-in-library types, Python's rich collection of operators and built-in functions, variables, assignment and scoping rules.
From this foundation, you will explore functions, a crucial aspect of any programming language, including considerable sophistication in defining parameters to a function and providing argument values. Explore advanced functional programming using generator expressions, comprehensions, and generator functions. Handle file input and output using web services and context managers, exception handling and explore wider, popular frameworks.
Through this concise and practical guide, you will explore all you need to know to leverage this powerful, and industry-standard, programming language.
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 short-circuit and if-else 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
Downloading the example code for this book. You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. If you purchased this book elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.