Welcome to Manning India!

We are pleased to be able to offer regional eBook pricing for Indian residents.
All eBook prices are discounted 40% or more!
Python Workout
50 Essential Exercises
Reuven M. Lerner
  • MEAP began April 2019
  • Publication in Spring 2020 (estimated)
  • ISBN 9781617295508
  • 350 pages (estimated)
  • printed in black & white

The book is a great adaptation of a face-to-face training at a fraction of the cost. It is like having a master instructor right next to you as you work through different problems.

Glen Sirakavit
The only way to master a skill is to practice. In Python Workout, author Reuven M. Lerner guides you through 50 carefully selected exercises that invite you to flex your programming muscles. As you take on each new challenge, you’ll build programming skill and confidence. The thorough explanations help you lock in what you’ve learned and apply it to your own projects. Along the way, Python Workout provides over four hours of video instruction walking you through the solutions to each exercise and dozens of additional exercises for you to try on your own.
Table of Contents detailed table of contents

1 Numeric types

1.1 Useful references

1.2 Number guessing game

1.2.1 Solution

1.2.2 Discussion

1.2.3 Beyond the exercise

1.3 Summing numbers

1.3.1 Solution

1.3.2 Discussion

1.3.3 Beyond the exercise

1.4 Run timing

1.4.1 Solution

1.4.2 Discussion

1.4.3 Beyond the exercise

1.5 Hexadecimal output

1.5.1 Solution

1.5.2 Discussion

1.5.3 Beyond the exercise

1.6 Summary

2 Strings

2.1 Useful references

2.2 Pig Latin

2.2.1 Solution

2.2.2 Discussion

2.2.3 Beyond the exercise

2.3 Pig Latin sentence

2.3.1 Solution

2.3.2 Discussion

2.3.3 Beyond the exercise

2.4 Ubbi Dubbi

2.4.1 Solution

2.4.2 Discussion

2.4.3 Beyond the exercise

2.5 Sorting a string

2.5.1 Solution

2.5.2 Discussion

2.5.3 Beyond the exercise

2.6 Summary

3 Lists and tuples

3.1 First-last

3.1.1 Solution

3.1.2 Discussion

3.1.3 Beyond the exercise

3.2 All A’s

3.2.1 Solution

3.2.2 Discussion

3.2.3 Beyond the exercise

3.3 Summing anything

3.3.1 Solution

3.3.2 Discussion

3.3.3 Beyond the exercise

3.4 Alphabetizing names

3.4.1 Solution

3.4.2 Discussion

3.4.3 Beyond the exercise

3.5 Word with most repeated letters

3.5.1 Solution

3.5.2 Discussion

3.5.3 Beyond the exercise

3.6 Printing tuple records

3.6.1 Solution

3.6.2 Discussion

3.6.3 Beyond the exercise

3.7 Summary

4 Dictionaries and sets

4.1 Hashing and dictionaries

4.2 Sets

4.3 How many different numbers?

4.3.1 Solution

4.3.2 Discussion

4.3.3 Beyond the exercise

4.4 Flip a dictionary

4.4.1 Solution

4.4.2 Discussion

4.4.3 Beyond the exercise

4.5 Rainfall

4.5.1 Solution

4.5.2 Discussion

4.5.3 Beyond the exercise

4.6 Dictdiff

4.6.1 Solution

4.6.2 Discussion

4.6.3 Beyond the exercise

4.7 Summary

5 Files

5.1 Last line

5.1.1 Solution

5.1.2 Discussion

5.1.3 Beyond the exercise

5.2 /etc/passwd to dict

5.2.1 Solution

5.2.2 Discussion

5.2.3 Beyond the exercise

5.3 Word count

5.3.1 Solution

5.3.2 Discussion

5.3.3 Beyond the exercise

5.4 Longest word per file

5.4.1 Solution

5.4.2 Discussion

5.4.3 Beyond the exercise

5.5 Reading and writing CSV

5.5.1 Solution

5.5.2 Discussion

5.5.3 Beyond the exercise

5.6 JSON

5.6.1 Solution

5.6.2 Discussion

5.6.3 Beyond the exercise

5.7 Reverse lines

5.7.1 Solution

5.7.2 Discussion

5.7.3 Beyond the exercise

5.8 Conclusion

6 Functions

6.1 XML generator

6.1.1 Solution

6.1.2 Discussion

6.1.3 Beyond the exercise

6.2 Prefix notation calculator

6.2.1 Solution

6.2.2 Discussion

6.2.3 Beyond the exercise

6.3 Password generator generator

6.3.1 Solution

6.3.2 Discussion

6.3.3 Beyond the exercise

6.4 Conclusion

7 Functional programming

8 Modules

9 Objects

10 Iterators and generators

Appendixes

Appendix A: Resources

About the Technology

Python is a versatile, elegant, general purpose programming language. Essential for data analysis, web development, artificial intelligence, games, desktop apps, and more, Python skills are a hot commodity. To become a strong Python programmer, you need to practice, learn from the mistakes you make along the way, and practice some more. Immersing yourself in Python exercises is the quickest path to Python fluency… and to enhancing your Python career!

About the book

Python Workout presents 50 exercises designed to deepen your skill with Python. You’ll not only tackle exercises using built-in data structures, but also more advanced techniques, such as functional programming, object-oriented programming, iterators, and generators. With each engaging challenge, you’ll practice a new skill and learn how to apply it to everyday coding tasks. You’ll also learn to combine features and techniques to tackle more complex jobs. To enrich your learning experience, author Reuven M. Lerner expands on the solution to each exercise in a series of illuminating videos.

What's inside

  • 50 hands-on exercises and solutions
  • Basic Python sequence types
  • Python dictionaries and sets
  • Functional programming in Python
  • Creating your own classes
  • Working with Python objects
  • Generator functions

About the reader

Intended for readers with basic Python skills.

About the author

Reuven M. Lerner, an independent consultant for more than two decades, teaches Python, data science, and Git to companies around the world. His Better developers newsletter and blog are read by thousands of Python developers each week. Reuven has written a monthly column, “At the Forge,” for Linux Journal since 1996 and is a panelist on the weekly Freelancers Show podcast. Reuven lives with his wife and three children in Modi’in, Israel, and can be reached at https://lerner.co.il/ or on Twitter at @reuvenmlerner.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $59.99 pBook + eBook + liveBook
MEAP eBook $47.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks