Glossary

Use comprehensions when:

The transformation is simple (one expression, optionally one filter) - The result is a new list or dictionary - The code is still readable on one or two lines

Learn More

Related Terms