Skip to content

Commit cfbe167

Browse files
committed
Implement code changes to enhance functionality and improve performance
1 parent 0aaf69a commit cfbe167

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/blog/python-comprehensions-step-by-step.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ description: In this short article, we are going to make some for loops and rewr
44
date: March 22, 2019
55
updated: July 3, 2022
66
tags: python, basics
7+
socialImage: /blog/python-comprehensions.png
78
---
89

910
<route lang="yaml">
@@ -14,10 +15,13 @@ meta:
1415
date: March 22, 2019
1516
updated: July 3, 2022
1617
tags: python, basics
18+
socialImage: /blog/python-comprehensions.png
1719
</route>
1820

1921
<blog-title-header :frontmatter="frontmatter" title="Python Comprehensions: A step by step Introduction" />
2022

23+
<img :src="frontmatter.socialImage" alt="Python 3.14 GIL" class="w-full rounded-lg my-4" />
24+
2125
_List Comprehensions_ are a special kind of syntax that let us create lists out of other lists ([Wikipedia](https://en.wikipedia.org/wiki/List_comprehension), [The Python Tutorial](https://docs.python.org/3/tutorial/datastructures.html#list-comprehensions)). They are incredibly useful when dealing with numbers and with one or two levels of nested _for loops_, but beyond that, they can become a little too hard to read.
2226

2327
In this article, we are going to make some _For Loops_ and rewrite them, step by step, into _Comprehensions_.

public/blog/python-comprehensions.png

2.93 MB
Loading

0 commit comments

Comments
 (0)