How to Format Your List Comprehensions
List comprehensions and comprehensions in general can get very long and go over the recommended line length. This lesson showed a couple of ways to break list comprehensions and write them over multiple lines without sacrificing their readability.
The next lessons will talk about the dangers or pitfalls to avoid when working with list comprehensions and when you should choose not to use them at all.
Comments & Discussion
Become a Member to join the conversation.