Indeed. That's why our most common coding challenge is this:
https://github.com/mshang/python-elevator-challengeWe ask you to see how far you can get in an hour and then review your code. We're looking for how you approach the problem and if you can write readable, maintainable code. You can learn a lot from how someone approaches this. We've seen dozens of different approaches, and in fact learned a lot ourselves from the different answers. Some are incredibly impressive. Some are just a bunch of if statements that lead nowhere. It's a great way of separating wheat from chaff quickly.
edit: The flask API was an interview I took, not one I gave. I considered it a very poor take home since it was ridiculously simple and didn't prove any actual skill, but as I said, less than 40% of their applicants were able to pass even such a simple question. They had very poor screening processes. It was also step 2 in their interview process right after a screening call and they spammed it to hundreds of people while our coding exercise is our final step after we've screened you past several people and had several hours to get to know you and are already pretty sure you're a good fit.