---
title: "Meaning & Key Takeaway of: Moreover, depending on your Python and…"
description: "\"“Moreover, depending on your Python and code, list comprehensions might run much faster than manual for loop statements (often roughly twice as fast) b..."
image: "https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg"
---

#  Moreover, depending on your Python and code, list…

![“Moreover, depending on your Python and code, list comprehensions might run much faster than manual for loop statements (often roughly twice as fast) because their iterations are performed at C language speed inside the interpreter, rather than with manual Python code.” quote by Mark Lutz](https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg)   [Download](https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg) [Open image](https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg)

> ““Moreover, depending on your Python and code, list comprehensions might run much faster than manual for loop statements (often roughly twice as fast) because their iterations are performed at C language speed inside the interpreter, rather than with manual Python code.””

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

## About This Quote

This interpretation was drafted with AI assistance. It is one reading of the quote, not the author's own explanation.

He explains that Python list comprehensions run faster because they execute at C speed within the interpreter, unlike manual loops.

**In simple terms:** List comprehensions are quicker than loops.

Key Takeaway

Use comprehensions for speed.

Themes

programming performance Python code efficiency

Mood

technical educational

Type

instructional analytical

When to use this quote

- software development
- data processing
- teaching

Key Concepts

software engineering algorithm optimization

Questions to Reflect On

- When should you favor loops?
- How do you balance speed and clarity?

A Different Perspective

Readability may suffer with complex comprehensions.

★ ★ ★ ★ ★   No ratings yet

[Programming](https://sms4smile.com/quotes/about/programming/) [Technology](https://sms4smile.com/quotes/about/technology/)

## Related quotes

> [Of everything I have done, 'The Archers' always gets the most excitement; there's a sort of uncontrollable joy from fans of the program.](https://sms4smile.com/quotes/felicity-jones/of-everything-i-have-done-the-archers-always-gets-the-most-excitement/)

[Felicity Jones](https://sms4smile.com/quotes/author/felicity-jones/)

> [I kind of pride myself on coming onto things that are well-oiled machines and finding a way to bring what I bring and fit…](https://sms4smile.com/quotes/rob-lowe/i-kind-of-pride-myself-on-coming-onto-things-that-are-well-oiled/)

[Rob Lowe](https://sms4smile.com/quotes/author/rob-lowe/)

> [I loved 'Chicago Code;' I watched that a lot. It was great because it really captured the city - I'm from Chicago, too.](https://sms4smile.com/quotes/jessy-schram/i-loved-chicago-code-i-watched-that-a-lot-it-was-great-because-it/)

[Jessy Schram](https://sms4smile.com/quotes/author/jessy-schram/)

> [A lot of the kids gave a lot of positive feedback about if I ever became a coach, they would love to play in…](https://sms4smile.com/quotes/penny-hardaway/a-lot-of-the-kids-gave-a-lot-of-positive-feedback-about-if-i-ever/)

[Penny Hardaway](https://sms4smile.com/quotes/author/penny-hardaway/)

> [It would be a piece of ingenuousness to accuse the man of today of his lack of moral code. The accusation would leave him…](https://sms4smile.com/quotes/jose-ortega-y-gasset/it-would-be-a-piece-of-ingenuousness-to-accuse-the-man-of-today-of/)

[Jose Ortega y Gasset](https://sms4smile.com/quotes/author/jose-ortega-y-gasset/)

> [With VR, we have this same vision, which is create this ultimate platform for sharing your imagination. Our huge community of 300,000 developers creates…](https://sms4smile.com/quotes/david-baszucki/with-vr-we-have-this-same-vision-which-is-create-this-ultimate/)

[David Baszucki](https://sms4smile.com/quotes/author/david-baszucki/)

> [I'm publicist, patron of nine charities, creative director, food consultant, recipe developer - and mum.](https://sms4smile.com/quotes/jack-monroe/i-m-publicist-patron-of-nine-charities-creative-director-food/)

[Jack Monroe](https://sms4smile.com/quotes/author/jack-monroe/)

> [Limit use of shareware and public domain software to systems without fixed disks. If you do use them on fixed disks, allocate separate subdirectories...…](https://sms4smile.com/quotes/john-mcafee/limit-use-of-shareware-and-public-domain-software-to-systems-without/)

[John McAfee](https://sms4smile.com/quotes/author/john-mcafee/)

> [Writing code means always having to say you're sorry.](https://sms4smile.com/quotes/paul-ford/writing-code-means-always-having-to-say-you-re-sorry/)

[Paul Ford](https://sms4smile.com/quotes/author/paul-ford/)

> [One of my most productive days was throwing away 1,000 lines of code.](https://sms4smile.com/quotes/ken-thompson/one-of-my-most-productive-days-was-throwing-away-1-000-lines-of-code/)

[Ken Thompson](https://sms4smile.com/quotes/author/ken-thompson/)

> [Programmers are always surrounded by complexity; we cannot avoid it… If our basic tool, the language in which we design and code our programs,…](https://sms4smile.com/quotes/tony-hoare/programmers-are-always-surrounded-by-complexity-we-cannot-avoid-it-if/)

[Tony Hoare](https://sms4smile.com/quotes/author/tony-hoare/)

> [“Check the program before you two start undressing and...well, doing whatever freaky shit you talked Harley into.” I”](https://sms4smile.com/quotes/james-cox/check-the-program-before-you-two-start-undressing-and-well-doing/)

[James Cox](https://sms4smile.com/quotes/author/james-cox/)

> [It is no secret that I have read 'The Da Vinci Code' several times. I genuinely believe that 'The Da Vinci Code' and 'Angels…](https://sms4smile.com/quotes/ashwin-sanghi/it-is-no-secret-that-i-have-read-the-da-vinci-code-several-times-i/)

[Ashwin Sanghi](https://sms4smile.com/quotes/author/ashwin-sanghi/)

> [When we shipped 'Borderlands 2,' we didn't ship it with a plan of how the level cap was going to increase. We didn't have…](https://sms4smile.com/quotes/randy-pitchford/when-we-shipped-borderlands-2-we-didn-t-ship-it-with-a-plan-of-how/)

[Randy Pitchford](https://sms4smile.com/quotes/author/randy-pitchford/)

> [“By rendering the model in ASN.1, the NCBI created a system that combined objects (DNA sequences, protein sequences, references, sequence features) from a variety…](https://sms4smile.com/quotes/anonymous/by-rendering-the-model-in-asn-1-the-ncbi-created-a-system-that/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

## More by Mark Lutz

> [“and indent all but the simplest of blocks.”](https://sms4smile.com/quotes/mark-lutz/and-indent-all-but-the-simplest-of-blocks/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“when in Pythonland, do as Pythonistas do, not as C programmers do.”](https://sms4smile.com/quotes/mark-lutz/when-in-pythonland-do-as-pythonistas-do-not-as-c-programmers-do/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“you can do everything in Python that you can in Perl, but”](https://sms4smile.com/quotes/mark-lutz/you-can-do-everything-in-python-that-you-can-in-perl-but/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Interestingly, the iteration protocol is even more pervasive in Python today than the examples so far have demonstrated — essentially everything in Python’s built-in…](https://sms4smile.com/quotes/mark-lutz/interestingly-the-iteration-protocol-is-even-more-pervasive-in-python/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Boolean and and or operators return a true or false object in Python, not the values True or False.”](https://sms4smile.com/quotes/mark-lutz/boolean-and-and-or-operators-return-a-true-or-false-object-in-python/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“\_\_next\_\_ raises a built-in StopIteration exception at end-of-file”](https://sms4smile.com/quotes/mark-lutz/next-raises-a-built-in-stopiteration-exception-at-end-of-file/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“Besides directory paths on Windows, raw strings are also commonly used for regular expressions”](https://sms4smile.com/quotes/mark-lutz/besides-directory-paths-on-windows-raw-strings-are-also-commonly-used/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“absolutes in performance benchmarks are as elusive as consensus in open source projects!”](https://sms4smile.com/quotes/mark-lutz/absolutes-in-performance-benchmarks-are-as-elusive-as-consensus-in/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“The name used as the assignment target in a for header line is usually a (possibly new) variable in the scope where the for…](https://sms4smile.com/quotes/mark-lutz/the-name-used-as-the-assignment-target-in-a-for-header-line-is/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“give people a tool, and they’ll code for a day; teach them how to build tools, and they’ll code for a lifetime. This”](https://sms4smile.com/quotes/mark-lutz/give-people-a-tool-and-they-ll-code-for-a-day-teach-them-how-to-build/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [ “This description requires elaboration when the value and the slice being assigned overlap: L\[2:5\]=L\[3:6\], for instance, works fine because the value to be inserted… ](https://sms4smile.com/quotes/mark-lutz/this-description-requires-elaboration-when-the-value-and-the-slice/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“We met the list comprehension briefly in Chapter 4. Syntactically, its syntax is derived from a construct in set theory notation that applies an operation…](https://sms4smile.com/quotes/mark-lutz/we-met-the-list-comprehension-briefly-in-chapter-4-syntactically-its/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“In Pythons 3.3 and 2.7, you can get help for a module you have not imported by quoting the module’s name as a string…](https://sms4smile.com/quotes/mark-lutz/in-pythons-3-3-and-2-7-you-can-get-help-for-a-module-you-have-not/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“a raw string cannot end in an odd number of backslashes.”](https://sms4smile.com/quotes/mark-lutz/a-raw-string-cannot-end-in-an-odd-number-of-backslashes/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

> [“In Python, practicality often beats aesthetics.”](https://sms4smile.com/quotes/mark-lutz/in-python-practicality-often-beats-aesthetics/)

[Mark Lutz](https://sms4smile.com/quotes/author/mark-lutz/)

[Explore all 22 Mark Lutz quotes ](https://sms4smile.com/quotes/author/mark-lutz/)

## More Programming quotes

> [Of everything I have done, 'The Archers' always gets the most excitement; there's a sort of uncontrollable joy from fans of the program.](https://sms4smile.com/quotes/felicity-jones/of-everything-i-have-done-the-archers-always-gets-the-most-excitement/)

[Felicity Jones](https://sms4smile.com/quotes/author/felicity-jones/)

> [When we shipped 'Borderlands 2,' we didn't ship it with a plan of how the level cap was going to increase. We didn't have…](https://sms4smile.com/quotes/randy-pitchford/when-we-shipped-borderlands-2-we-didn-t-ship-it-with-a-plan-of-how/)

[Randy Pitchford](https://sms4smile.com/quotes/author/randy-pitchford/)

> [It is no secret that I have read 'The Da Vinci Code' several times. I genuinely believe that 'The Da Vinci Code' and 'Angels…](https://sms4smile.com/quotes/ashwin-sanghi/it-is-no-secret-that-i-have-read-the-da-vinci-code-several-times-i/)

[Ashwin Sanghi](https://sms4smile.com/quotes/author/ashwin-sanghi/)

> [“Check the program before you two start undressing and...well, doing whatever freaky shit you talked Harley into.” I”](https://sms4smile.com/quotes/james-cox/check-the-program-before-you-two-start-undressing-and-well-doing/)

[James Cox](https://sms4smile.com/quotes/author/james-cox/)

> [Programmers are always surrounded by complexity; we cannot avoid it… If our basic tool, the language in which we design and code our programs,…](https://sms4smile.com/quotes/tony-hoare/programmers-are-always-surrounded-by-complexity-we-cannot-avoid-it-if/)

[Tony Hoare](https://sms4smile.com/quotes/author/tony-hoare/)

> [One of my most productive days was throwing away 1,000 lines of code.](https://sms4smile.com/quotes/ken-thompson/one-of-my-most-productive-days-was-throwing-away-1-000-lines-of-code/)

[Ken Thompson](https://sms4smile.com/quotes/author/ken-thompson/)

> [Writing code means always having to say you're sorry.](https://sms4smile.com/quotes/paul-ford/writing-code-means-always-having-to-say-you-re-sorry/)

[Paul Ford](https://sms4smile.com/quotes/author/paul-ford/)

> [Limit use of shareware and public domain software to systems without fixed disks. If you do use them on fixed disks, allocate separate subdirectories...…](https://sms4smile.com/quotes/john-mcafee/limit-use-of-shareware-and-public-domain-software-to-systems-without/)

[John McAfee](https://sms4smile.com/quotes/author/john-mcafee/)

> [I'm publicist, patron of nine charities, creative director, food consultant, recipe developer - and mum.](https://sms4smile.com/quotes/jack-monroe/i-m-publicist-patron-of-nine-charities-creative-director-food/)

[Jack Monroe](https://sms4smile.com/quotes/author/jack-monroe/)

> [With VR, we have this same vision, which is create this ultimate platform for sharing your imagination. Our huge community of 300,000 developers creates…](https://sms4smile.com/quotes/david-baszucki/with-vr-we-have-this-same-vision-which-is-create-this-ultimate/)

[David Baszucki](https://sms4smile.com/quotes/author/david-baszucki/)

> [It would be a piece of ingenuousness to accuse the man of today of his lack of moral code. The accusation would leave him…](https://sms4smile.com/quotes/jose-ortega-y-gasset/it-would-be-a-piece-of-ingenuousness-to-accuse-the-man-of-today-of/)

[Jose Ortega y Gasset](https://sms4smile.com/quotes/author/jose-ortega-y-gasset/)

> [A lot of the kids gave a lot of positive feedback about if I ever became a coach, they would love to play in…](https://sms4smile.com/quotes/penny-hardaway/a-lot-of-the-kids-gave-a-lot-of-positive-feedback-about-if-i-ever/)

[Penny Hardaway](https://sms4smile.com/quotes/author/penny-hardaway/)

> [I loved 'Chicago Code;' I watched that a lot. It was great because it really captured the city - I'm from Chicago, too.](https://sms4smile.com/quotes/jessy-schram/i-loved-chicago-code-i-watched-that-a-lot-it-was-great-because-it/)

[Jessy Schram](https://sms4smile.com/quotes/author/jessy-schram/)

> [I kind of pride myself on coming onto things that are well-oiled machines and finding a way to bring what I bring and fit…](https://sms4smile.com/quotes/rob-lowe/i-kind-of-pride-myself-on-coming-onto-things-that-are-well-oiled/)

[Rob Lowe](https://sms4smile.com/quotes/author/rob-lowe/)

> [“By rendering the model in ASN.1, the NCBI created a system that combined objects (DNA sequences, protein sequences, references, sequence features) from a variety…](https://sms4smile.com/quotes/anonymous/by-rendering-the-model-in-asn-1-the-ncbi-created-a-system-that/)

[Anonymous](https://sms4smile.com/quotes/author/anonymous/)

[Browse all 6,477 Programming quotes ](https://sms4smile.com/quotes/about/programming/)

```json
{
    "@context": "https://schema.org",
    "@graph": [
        {
            "@type": "Quotation",
            "text": "“Moreover, depending on your Python and code, list comprehensions might run much faster than manual for loop statements (often roughly twice as fast) because their iterations are performed at C language speed inside the interpreter, rather than with manual Python code.”",
            "creator": {
                "@type": "Person",
                "name": "Mark Lutz"
            },
            "isPartOf": {
                "@id": "https://sms4smile.com/quotes/#website"
            },
            "url": "https://sms4smile.com/quotes/mark-lutz/moreover-depending-on-your-python-and-code-list-comprehensions-might/",
            "about": {
                "@type": "Thing",
                "name": "Programming"
            },
            "@id": "https://sms4smile.com/quotes/mark-lutz/moreover-depending-on-your-python-and-code-list-comprehensions-might/#quotation",
            "image": {
                "@type": "ImageObject",
                "@id": "https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg",
                "contentUrl": "https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg",
                "url": "https://sms4smile.com/quotes/i/fc5/mark-lutz-25814_programming_moreover-depending-on-your-python-and-co_2830035.jpg",
                "width": 1080,
                "height": 1080,
                "caption": "“Moreover, depending on your Python and code, list comprehensions might run much faster than manual for loop…” — Mark Lutz",
                "creditText": "SMS4Smile Quotes",
                "creator": {
                    "@id": "https://sms4smile.com/quotes/#organization"
                }
            }
        },
        {
            "@type": "BreadcrumbList",
            "itemListElement": [
                {
                    "@type": "ListItem",
                    "position": 1,
                    "name": "Home",
                    "item": "https://sms4smile.com/"
                },
                {
                    "@type": "ListItem",
                    "position": 2,
                    "name": "Quotes",
                    "item": "https://sms4smile.com/quotes/"
                },
                {
                    "@type": "ListItem",
                    "position": 3,
                    "name": "Mark Lutz",
                    "item": "https://sms4smile.com/quotes/author/mark-lutz/"
                },
                {
                    "@type": "ListItem",
                    "position": 4,
                    "name": "“Moreover, depending on your Python and...",
                    "item": "https://sms4smile.com/quotes/mark-lutz/moreover-depending-on-your-python-and-code-list-comprehensions-might/"
                }
            ],
            "@id": "https://sms4smile.com/quotes/mark-lutz/moreover-depending-on-your-python-and-code-list-comprehensions-might/#breadcrumb"
        },
        {
            "@type": "WebSite",
            "@id": "https://sms4smile.com/quotes/#website",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "publisher": {
                "@id": "https://sms4smile.com/quotes/#organization"
            }
        },
        {
            "@type": "Organization",
            "@id": "https://sms4smile.com/quotes/#organization",
            "name": "SMS4Smile Quotes",
            "url": "https://sms4smile.com/quotes/",
            "logo": {
                "@type": "ImageObject",
                "url": "https://sms4smile.com/quotes/wp-content/themes/sq/assets/icons/icon-512.png",
                "width": 512,
                "height": 512
            }
        }
    ]
}
```
