
Unlocking Python
A Comprehensive Guide for Beginners
By: Ryan Mitchell
Paperback | 9 June 2025 | Edition Number 1
At a Glance
448 Pages
Paperback
$87.75
or 4 interest-free payments of $21.94 with
orAvailable: 9th June 2025
Preorder. Will ship when available.
A fun and practical guide to learning Python with a special focus on data science, web scraping, and web applications
In Unlocking Python: A Comprehensive Guide for Beginners, veteran software engineer, educator, and author Ryan Mitchell delivers an intuitive, engaging, and practical roadmap to Python programming. The author walks you through the vocabulary, tools, foundational knowledge, and occasional pop-culture references you'll need to hone your skills with this popular programming language.
You'll learn how to install and run Python on your own machine, get up and coding with the language quickly, and best practices for programming both independently and in the workplace. You'll also find:
- Key concepts in computer and data science explained from the ground up
- Advanced Python topics such as logging, unit testing, multiprocessing, and interacting with databases.
- Introductions to some of Python's most popular third-party libraries: Flask, Django, Scrapy, Scikit-Learn, Numpy, and Pandas
- Amusing anecdotes from the trenches of industry
Perfect for tech-savvy professionals at any stage of their careers who are interested in diving into Python programming. Unlocking Python is also a must-read for readers who work in a technical role but are interested in getting more directly involved with programming, as well as non-Python programmers who want to apply their technical skill to a new language.
Part I: Programming
Chapter 1: Introduction to Programming 3
Programming as a Career 4
Myths About Programmers 4
How Computers Work 7
A Brief History of Modern Computing 12
The Unix Operating System 12
Modern Programming 13
Talking About Programming Languages 14
Problem-Solving as a Programmer 17
Chapter 2: Programming Tools 21
Shell 21
Version Control Systems 25
Authenticating with GitHub with SSH Keys 27
Integrated Development Environments 33
Web Browsers 34
Chapter 3: About Python 37
The Python Software Foundation 38
The Zen of Python 39
The Python Interpreter 40
The Python Standard Library 41
Third-Party Libraries 42
Versions and Development 43
Part II: Python
Chapter 4: Installing and Running Python 47
Installing Python 47
Windows 48
macOS 48
Linux 49
Installing and Using pip 50
Windows 51
macOS 51
Linux 51
Installing and Using Jupyter for IPython files 52
Virtual Environments 54
Anaconda 56
Chapter 5: Python Quickstart 59
Variables 59
Data Types 62
Operators 67
Arithmetic Operators 67
Operators and Assignments 69
Comparison Operators 70
Identity Operators 71
Boolean Operators 73
Membership Operators 73
Control Flow 74
If and Else 75
For 76
While 76
Functions 78
Classes 80
Everything Is an Object 82
Data Structures 82
Lists 83
Dictionaries 84
Tuples 86
Sets 86
Exercises 88
Chapter 6: Lists and Strings 91
String Operations 91
String Methods 92
List Operations 95
Slicing 97
List Comprehensions 100
Exercises 103
Chapter 7: Dictionaries, Sets, and Tuples 105
Dictionaries 105
Dictionary Comprehensions 108
Reducing to Dictionaries 110
Sets 112
Tuples 114
Exercises 116
Chapter 8: other Types of Objects 119
Other Numbers 119
Dates 124
Bytes 129
Exercises 132
Chapter 9: Iterables, Iterators, Generators, and Loops 135
Iterables and Iterators 135
Generators 137
Looping with Pass, Break, Else, and Continue 139
Assignment Expressions 143
Walrus Operators 143
Recursion 144
Exercises 148
Chapter 10: Functions 149
Positional Arguments and Keyword Arguments 149
Functions as First-Class Objects 155
Lambda Functions 158
Namespaces 160
Decorators 163
Exercises 168
Chapter 11: Classes 171
Static Methods and Attributes 173
Inheritance 175
Multiple Inheritance 178
Encapsulation 182
Polymorphism 186
Exercises 188
Chapter 12: Writing Cleaner Code 189
PEP 8 and Code Styles 189
Comments and Docstrings 190
Documentation 194
Linting 196
Formatting 199
Type Hints 200
Part III: Advanced Topics
Chapter 13: Errors and Exceptions 207
Handling Exceptions 207
Else and Finally 210
Raising Exceptions 212
Custom Exceptions 214
Exception Handling Patterns 217
Exercises 223
Chapter 14: Modules and Packages 225
Modules 225
Import This 228
Packages 229
Installing Packages 235
Exercises 240
Chapter 15: Working with Files 243
Reading Files 243
Writing Files 247
Binary Files 250
Buffering Data 252
Creating and Deleting Files and Directories 254
Serializing, Deserializing, and Pickling Data 256
Exercises 259
Chapter 16: Logging 261
The Logging Module 261
Handlers 266
Formatting 269
Exercises 272
Chapter 17: Threads and Processes 275
How Threads and Processes Work 275
Threading Module 276
Locking 280
Queues 283
Multiprocessing Module 285
Exercises 292
Chapter 18: Databases 293
Installing and Using SQLite 294
Installing SQLite 294
Using SQLite 296
Query Language Syntax 297
Using SQLite with Python 300
Object Relational Mapping 303
Exercises 306
Chapter 19: Unit Testing 307
The Unit Testing Framework 309
Setting Up and Tearing Down 312
Mocking Methods 314
Mocking with Side Effects 318
Part IV: Python Frameworks
Chapter 20: Rest Apis and Flask 323
HTTP and APIs 323
Getting Started with Flask Applications 327
APIs in Flask 330
Databases 333
Authentication 336
Sessions 338
Templates 342
Chapter 21: Django 345
Installing Django and Starting Django 346
Databases and Migrations 351
Django Admin Interface 353
Models 355
More Views and Templates 358
More Resources 361
Chapter 22: Web Scraping and Scrapy 363
Installing and Using Scrapy 364
Parsing HTML 366
Items 371
Crawling with Scrapy 372
Item Pipelines 376
Chapter 23: Data Analysis with Numpy and Pandas 379
NumPy Arrays 380
Pandas DataFrames 383
Cleaning 387
Filtering and Querying 391
Grouping and Aggregating 393
Chapter 24: Machine Learning with Matplotlib And Scikit-learn 397
Types of Machine Learning Models 398
Exploratory Analysis with Matplotlib 400
Building Supervised Models with Scikit-Learn 409
Evaluating Classification Models with Scikit-Learn 415
Index 421
ISBN: 9781394288496
ISBN-10: 1394288492
Available: 9th June 2025
Format: Paperback
Language: English
Number of Pages: 448
Audience: General Adult
Publisher: John Wiley & Sons Inc (US)
Country of Publication: GB
Edition Number: 1
Shipping
Standard Shipping | Express Shipping | |
---|---|---|
Metro postcodes: | $9.99 | $14.95 |
Regional postcodes: | $9.99 | $14.95 |
Rural postcodes: | $9.99 | $14.95 |
How to return your order
At Booktopia, we offer hassle-free returns in accordance with our returns policy. If you wish to return an item, please get in touch with Booktopia Customer Care.
Additional postage charges may be applicable.
Defective items
If there is a problem with any of the items received for your order then the Booktopia Customer Care team is ready to assist you.
For more info please visit our Help Centre.