Skip to content

language

#37: Decorators

Decorators are an interesting concept in Python. We use them in Flask to configure routing, but they are not limited to this use case. Let us find out what we can do with them and how they work.

#30: List Comprehension

If you want to create a list from the values of another list, you most likely will write a for loop. That works and is how you would solve this exercise in any other language. However, there is a more pythonic way to do it called list comprehension.

#26: The dir() Function

I constantly run into the problem that I cannot remember what methods exist on an object. If you have the same problem in the interactive prompt, then the built-in function dir() can help you.