DEV Community

Jeremy Grifski
Jeremy Grifski

Posted on • Edited on

5

My Favorite Python Feature: List Comprehensions

As someone playing around in the YouTube space, I decided to make a video which explains the following code snippet:

[item for item in range(1, 101)]
Enter fullscreen mode Exit fullscreen mode

If you're not sure what you're looking at, that's fine! In short, it's a list comprehension that generates a list containing all integers from 1 to 100 (excluding 101). If you'd like to learn more about this syntax, check out the following video:

Alternatively, you're welcome to check out the article which inspired the video. In either case, thanks for checking out my work!

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay