-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[New Concept Exercise] : list-comprehensions #2295
Copy link
Copy link
Closed
Labels
claimed 🐾For new exercises being written by contributors and maintainers.For new exercises being written by contributors and maintainers.maintainer action required❕A maintainer needs to take action on this.A maintainer needs to take action on this.new exercise ✨x:size/largeLarge amount of workLarge amount of workx:status/claimedSomeone is working on this issueSomeone is working on this issue
Metadata
Metadata
Assignees
Labels
claimed 🐾For new exercises being written by contributors and maintainers.For new exercises being written by contributors and maintainers.maintainer action required❕A maintainer needs to take action on this.A maintainer needs to take action on this.new exercise ✨x:size/largeLarge amount of workLarge amount of workx:status/claimedSomeone is working on this issueSomeone is working on this issue
This issue describes how to implement the
list-comprehensionsconcept exercise for the Python track.Getting started
Please please please read the docs before starting. Posting PRs without reading these docs will be a lot more frustrating for you during the review cycle, and exhaust Exercism's maintainers' time. So, before diving into the implementation, please read up on the following documents:
Goal
The goal of this exercise is to teach the syntax and variants of
list comprehensionsin Python.Learning objectives
list comprehensionrelates to theloop+appendmethod of creating/computing aList.loop+appendstring,List, or otheriterable(such aszip()ordict.items())Out of scope
generatorsandgenerator expressionsinlist comprehensionsmap()andfilter()relate to or differ fromlist comprehensionsassignment expression(walrus operator) with alist comprehensionConcepts
list-comprehensionsPrerequisites
basicsboolscomparisonsconditionalslistslist-methodsloopsiterationsequencesResources to refer to
Hints
List Comprehensionssection of the Python docs tutorial: List ComprehensionsAfter
comprehension syntaxfor other data structures such assetsanddictionariesgeneratorsandgenerator expressionsgeneratorsandgenerator expressionsinlist comprehensionsRepresenter
No changes required.
Analyzer
No changes rquired.
Implementing
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.