In the free Webinar I gave yesterday about functional programming, I mentioned that “map,” or its equivalent (e.g., Python’s list comprehensions), is a powerful tool that I use nearly every
My most recent blog post talked about the use of str.format instead of the % operator for interpolating values into strings. Some people who read the post wondered about their
I have been programming in Python for many years. One of the things that I wondered, soon after starting to work in Python, was how you can get Perl-style variable
I love developing software. I also love helping people to learn how to develop better. That’s why I have been teaching programming classes for more than a decade, and why
I teach Ruby and Python to a lot of people — in formal courses, and in one-on-one pairing sessions, both online and in person. I’ve found that for many people,
We’re nearly at the end of my tour of the “reduce” function in Ruby and Python. Just as I showed in the previous installment how we can implement the “map”
This is another installment in my “reduce” series of posts, aimed at helping programmers understand this function, with examples in both Ruby and Python. So far, we have seen how
In the last few installments (first, second, third, and fourth) of this series, we saw how “reduce” can be used to build up a scalar value (such as a number
In the first few parts of this series (first, second, and third), I introduced the “reduce” function, and showed how it can be used in a number of ways. However,
This is the third installment of my “reduce” series of blog posts. For the first, see here, and for the second, see here. If you have been reading this series,