Closed DavidGerva closed 4 years ago
This should be in the collections
concept exercise where you can explain everything about collections, including the in
keyword.
Ooof. @DavidGerva -- After going back over this twice, I have to agree with @aimorris - we should do membership checking alongside each data structure, and not try to making it it's own exercise. Having checked tuples
and lists
-- we're already doing that, so I am going to close this as no longer relevant
. Apologies for having you do extra work. 😦 .
If there is a strong disagreement, please re-open.
(I agree with the decision of adding in
to each data structure's exercise.)
This issue describes how to implement the
membership testing 'in'
operator concept 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:
Please also watch the following video:
Goal
This concept exercise should convey a basic understanding of the
in
operator in Python to perform a membership testing.Learning objectives
in
operator to tests if an object is (not) a member of a collectionOut of scope
is
andis not
Concepts
in
operatorPrerequisites
basics
True
,False
dicts
lists
sets
tuples
Resources to refer to
Hints
After
Nothing
Representer
No changes required.
Analyzer
No changes required.
Implementing
Tests should be written using unittest.TestCase and the test file named in_test.py.
Help
If you have any questions while implementing the exercise, please post the questions as comments in this issue.
Edits