Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

This lesson is for members only. Join us and get access to hundreds of tutorials and a community of expert Pythonistas.

Unlock This Lesson

Hint: You can adjust the default video playback speed in your account settings.
Hint: You can set the default subtitles language in your account settings.
Sorry! Looks like there’s an issue with video playback 🙁 This might be due to a temporary outage or because of a configuration issue with your browser. Please see our video player troubleshooting guide to resolve the issue.

How to Format Your List Comprehensions

Give Feedback

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.

Resources#

Anonymous on March 14, 2019

where is the links as mentioned in Vedio ?

Dan Bader RP Team on March 14, 2019

Ah, I added the link on the course description and not on the video at first. Here it is: Comprehending Python’s Comprehensions

Become a Member to join the conversation.