NoStarch Author Questionnaire for Upcoming Book “Python One-Liners”

Rate this post

Today, I filled in the author questionnaire for any author who publishes a book with the international techbook publisher NoStarchPress. I share this article because (1) other authors may be interested in how the concrete questions look like, and (2) Finxter readers may be interested in the upcoming book “Python One-Liners” (to appear in 2019) which promises you to increase your Python skill level to advanced intermediate.

*** Let’s talk about your book first. ***

How would you (briefly) explain your book and its content to someone who knows nothing about Python One-Liners? Think non-technical people; this helps us pitch your book to sales reps and the media.

Python is the fastest-growing major programming language in the world.

The book pushes the beginner- to intermediate-level Python coder to the next level so that they become confident in reading advanced Python codebases. To achieve this, the book focuses on so-called ‘Python one-liners’, defined as “concise statements of useful functionality packed into a single line of code”.

It’s simple: Before you can understand a codebase with thousands of lines of code, you first have to understand the meaning of a single line of code. After reading the book, you’ll be able to understand every single line of Python code you’ll ever encounter in practice!

Which aspects of your book would you describe as major selling points? Think about what will make the book appealing to readersβ€”the kinds of things you’d want us to highlight in a press release, media pitch letters, or any other promotional materials.

  • The book teaches you to understand every single line of Python code, you’ll ever encounter in practice.
  • The book goes beyond Python addressing many fundamental and hot topics in computer science: machine learning, data science, algorithms, regular expressions.
  • The book doesn’t use dummy problems but solves real problems with the one-liners.
  • The book shows you how to save a lot of time in day-to-day work with Python regular expressions.
  • The book introduces the most important advanced Python features such as list comprehension, slicing, lambda functions, regular expressions, map and reduce functions, and slice assignments.
  • The book contains a concise Python Crash Course that brings you back into shape.
  • The book contains the best Python tricks to accomplish more with less.
  • The book introduces wildly popular Python libraries such as NumPy for data science, Scikit-learn for machine learning, and re for regular expressions.
  • The book teaches you how to write concise Python code in its most extreme form.

Please briefly summarize how your book approaches its subject matter in terms of format, tone, breadth of coverage, special/tools/tutorials, etc.

The book consists of six mostly independent chapters in different areas of computer science: Python Crash Course, Python Tricks, Data Science, Machine Learning, Regular Expressions, and Algorithms. Each technical chapter consists of 10 one-liner sections. Each one-liner section explains in great technical detail one concise Python code snippet that solves a practical Python problem in a single line of code. By studying these one-liners your Python and general computer science skills will improve.

What are some concrete examples from this book that might draw readers in?

The book is about Python one-liners, defined as “concise statements of useful functionality packed into a single line of code”.

Here is an example of such a one-liner:

qsort = lambda l : [x for x in l[1:] if x < l[0]] + [l[0]] + [x for x in l[1:] if x >= l[0]]

The meaning of this one-liner is difficult to grasp for many Python coders (between beginner and intermediate level). Still, it is a beautiful and concise way of compressing the famous Quicksort algorithm into a single line of code.

The central thesis of this book is that learning Python one-liners is the fundament of understanding more advanced codebases. Before understanding what is going on in a codebase with thousands of lines, you have to understand the meaning of a single line of code.

As it turns out, there is a wide difficulty range of Python one-liners. In other words, one-liners can be simple, intermediate, or hard to understand. For example, the above Quicksort one-liner is based upon the concept of list comprehension as shown in the following one-liner (creating a list of squared numbers):

lst  = [x**2 for x in range(10)]

Before understanding above Quicksort algorithm, you have to understand the concept of list comprehension. Otherwise, there is no way, you can understand the meaning of the Quicksort one-liner which heavily builds upon list comprehension. The book leads you smoothly from the level of understanding basic one-liners to an advanced level of understanding complex one-liners such as the Quicksort algorithm above. The general order of the one-liners presented in the book goes from easy to hard.

What ideas, concepts, or skills do you hope your readers will take away from this book? Please describe your audience, along with any knowledge or skills that you assume the reader has already.

Do you feel stuck in Python somewhere between the beginner and the intermediate level? But you don’t know how to break out and move to the next level? And do you often struggle with other people’s code finding it hard to understand?

Chances are that you still suffer from a lack of fundamental Python skills that drags you down. Before you can understand complex code bases, you first have to know the Python fundamentals by heart. This book pushes you to advanced Python level by teaching you in a slow, technical, and comprehensive manner how to systematically break up and understand every single line of Python code. With this knowledge, you’ll be able to understand advanced code bases and Python libraries.

In addition to that, you’ll learn the ten most important machine learning algorithms, Python tricks, how to solve practical data science problems with NumPy, and how to save hundreds of hours with Python regular expressions.

Which books (or other resources), if any, do you think are the most competitive or similar to Python One-Liners?

  • Learning Python, 5th Edition by Mark Lutz | Jul 6, 2013
  • A Smarter Way to Learn Python: Learn it faster. Remember it longer. by Mark Myers | Aug 9, 2017
  • Python Crash Course, 2nd Edition: A Hands-On, Project-Based Introduction to Programming
  • Python Tricks: A Buffet of Awesome Python Features by Dan Bader

What sets your book apart from other books similar to it (i.e. to those titles listed above)?

The Python One-Liners book has a rigorous focus on a single line of Python code. It’s not a collection of functions, features, or small code snippets. It’s the only book that teaches how to write extremely dense and concise Python code.

For some coders (e.g. working at Google), writing dense Python code has become something like a fun challenge game – whoever writes the shortest Python code wins. This book is as much for them as it is for the beginner-level Python coder who wants to find its place in the wide area of computer science.

On top of that, we are covering not only core Python code but other areas and concepts in computer science that are of major importance: machine learning, data science, regular expressions, and algorithms. This way, the book can be seen as an intermediate-level introduction to hot areas in computer science (in Python). The other Python books focus either solely on Python or solely on one or two specific libraries.

What are some good keywords that you’d pull from this book (think about words that someone looking for it on a search engine might type in)?

Python, Python Tricks, Python One-Liners, Python Book, Stuck in Python, NumPy examples, Python Regular Expression Examples, Python Machine Learning Examples, Python Computer Science, Python Basics

Our Early Access program allows readers to purchase and read early versions of chapters from books in progress. Sometimes these chapters need further editorial work, but our readers like to get certain information early. Early Access is PDF only, and once the Early Access title is published, readers will receive the final eBook bundle including PDF, ePub and Mobi files. You can read more about Early Access here:Β

Early Access works as a marketing tool, often increases pre-order sales, and allows our editors (and you) to get helpful feedback from early readers. Would you like your book to be part of our Early Access program?Β 

Yes, great idea.

*** Now, let’s focus on you. ***

Can you please tell us about your professional background, and how that experience lends itself to the book?Β  Why should readers want to learn from you?

The book teaches Python and computer science concepts. In the last ten years of my life, I’ve focused on learning and teaching computer science—while studying computer science and while working as a doctoral researcher (and as a teacher) at the University of Stuttgart. I am as much a student as I am a teacher.

Since I finished my doctoral research program, I’ve created an online education company that focuses on teaching Python to hundreds of thousands of coders online. In the last two years, I published four Python books, created several Python-related websites, wrote hundreds of Python blog posts and daily Python columns for my “Coffee Break Python” email readers (, and created a Python-centric computer science academy (

The close relationship with many Python students taught me that time is their scarcest resource. Teachers today must focus the attention of their students to the most important topics. Students don’t want to read comprehensive manuals comprising of mostly impractical pieces of information. They would rather go for “probabilistic” pieces of knowledge that matter for them in their daily lives. And they want it delivered in small pieces that can be consumed independently in small doses. The Python one-liner book does just that consisting of 60 small daily lessons (a one-liner each day) about the most important topics in computer science.

Are there any facts about you (academic degrees, professional achievements, etc.) that you would like to share?

  • Diplomate Computer Scientist (University of Stuttgart)
  • Finished Doctoral Research Program (University of Stuttgart)
  • Creator of Top 15 Python Blogs

No need to explicitly share those though.

Where to Go From Here

If you are interested in the upcoming one-liner book to improve your Python skills, register for my email newsletter where I’ll spread the word and start giveaways and other promotions only accessible to my loyal email community.

Leave a Comment