Head First Python: A Learner’s Guide to the Fundamentals of Python Programming, A Brain-Friendly Guide, 3rd Edition
- Length: 600 pages
- Edition: 3
- Language: English
- Publisher: O'Reilly Media
- Publication Date: 2023-10-03
- ISBN-10: 1492051292
- ISBN-13: 9781492051299
- Sales Rank: #623122 (See Top 100 Books)
Want to learn the Python language without slogging your way through how-to manuals? With Head First Python, you’ll quickly grasp Python’s fundamentals, working with the built-in data structures and functions. Then you’ll move on to building your very own webapp, exploring database management, exception handling, and data wrangling.
If you’re intrigued by what you can do with context managers, decorators, comprehensions, and generators, it’s all here. This third edition is a complete learning experience that will help you become a bonafide Python programmer in no time.
Preface Install the latest Python 3 Installing on Windows Installing on macOS Installing on Linux Python on its own is not enough Install the latest Jupyter Notebook back-end Install the latest release of VS Code Configure VS Code to your taste Add 2 required extensions to VS Code VS Code’s Python support is state-of-the-art Why Python?: Similar But Different Getting ready to run your code You’ll use VS Code for everything Python, Jupyter, and VS Code Preparing for your first REPL experience Python code is easy to run! Pressing Shift+Enter runs your code cell Python code really is easy to run But, wait! There’s more… Python ships with a rich standard library BTW: Python is not a “toy language” Only write the code you need The PSL comes packed with powerful built-in functions BIFs provide practical, generic functionality The print dir combo mambo Getting help with dir’s output There’s built-in functionality everywhere! The Big 4: list, tuple, dictionary, and set Python has powerful built-in operators Python’s package ecosystem is to die for The Opening Crossword The Opening Crossword Solution Just when you thought you were done… 1. Diving in: Hit the Ground Running! Once upon a time, there was a swim coach… Fortune decides to smile on you! Cubicle Conversation Task #1: Extract data from the file’s name A string is not really a string… Let’s see what happens when Python runs this line of code: Let’s get back to that string… You’re still on Task #1 Don’t try to guess what a method does… The split method returns a list of words… Is it time for another tickmark? How to understand Python’s error messages Be careful when chaining method calls Fixing broken chains Strings can do more than just split Let’s try another string method You’re nearly done with Task #1 It looks like Task #1 is complete! Can you do without the parts list? We can think of three reasons! Multiple assignment (aka unpacking) Task #1 is done! Task #2: Process the data in the file The Unpacking Crossword The Unpacking Crossword Solution 2. Lists of Numbers: Processing List Data Task #2: Process the data in the file Grab a copy of the Coach’s data The open BIF works with files Not much code, but there’s lots happening… Variables are created dynamically, as needed It’s not that file objects aren’t exciting… Work has started on Task #2 Your new best friend, Python’s colon That was almost too easy Pause to review this task’s code Converting a time string into a time value Convert the times to hundredths of seconds Swim times to hundredths of seconds If you can convert one swim time… Python’s favorite looping mechanism: for The gloves are off… for loops vs. while loops You’re motoring now! Let’s keep a copy of the conversions Creating a new, empty list Displaying a list of your list’s methods It’s time to calculate the average Convert the average to a swim time string It’s been a while since your last tick mark… Task #2 (finally) gets over the line! The Listers Crossword The Listers Crossword Solution
Donate to keep this site alive
How to download source code?
1. Go to: https://www.oreilly.com/
2. Search the book title: Head First Python: A Learner’s Guide to the Fundamentals of Python Programming, A Brain-Friendly Guide, 3rd Edition
, sometime you may not get the results, please search the main title
3. Click the book title in the search results
3. Publisher resources
section, click Download Example Code
.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.