From ed06724d78a198390494df66b53a995685949d09 Mon Sep 17 00:00:00 2001 From: Stephen George <208529+sfgeorge@users.noreply.github.com> Date: Mon, 29 Apr 2024 06:48:17 -0400 Subject: [PATCH] [TYPO] Eliminate variants of Python Generator Expressions (#5510) * [TYPO] Eliminate variants of Python Generator Expressions * [GRAMMAR] Simplify "creating generators that generate" language * Avoid using the word 'generating' too much --- .../102-python-advanced-topics/107-generator-expressions.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/roadmaps/python/content/102-python-advanced-topics/107-generator-expressions.md b/src/data/roadmaps/python/content/102-python-advanced-topics/107-generator-expressions.md index adef6c18d..2334d8daa 100644 --- a/src/data/roadmaps/python/content/102-python-advanced-topics/107-generator-expressions.md +++ b/src/data/roadmaps/python/content/102-python-advanced-topics/107-generator-expressions.md @@ -1,8 +1,8 @@ -# Generator Compressions +# Generator Expressions -Generator comprehensions are a concise way to create a generator using a single line of code in Python. They are similar to list comprehensions, but instead of creating a list, they create a generator object that produces the values on-demand, as they are needed. +Generator expressions are a concise way to create a generator using a single line of code in Python. They are similar to list comprehensions, but instead of creating a list, they create a generator object that produces the values on-demand, as they are needed. -Generator comprehensions are a useful tool for creating generators that generate a large sequence of values, as they allow you to create the generator without creating the entire sequence in memory at once. This can be more efficient and use less memory, especially for large sequences. +Generator expressions are a useful tool for efficiently producing large sequence of values, as they allow you to create the generator without creating the entire sequence in memory at once. This tends to use less memory, especially for large sequences. Visit the following resources to learn more: