Rodrigo Girão Serrão: A generator, duck typing, and a branchless conditional walk into a bar
mathspp.com·5h
Flag this post

What’s your favourite line of Python code?

My friend Aaron is quite a character. One day, he was giving a talk and said that everyone must have their favourite line of code. And he was absolutely sure of what he was saying. His conviction is that everyone is so deep into their craft that they naturally feel strongly about some lines of code. So much so that one of them is their personal favourite.

The caveat is that he was talking about APL, not about Python, and with that context in mind the idea of “everyone having a favourite line of code” makes much more sense, believe it or not.

But that got me thinking... Do I have a favourite line of Python code? What is it?

I like generators

There are lots of things I like about the Python language, like the fact that it is very…

Similar Posts

Loading similar posts...