Skip to content

Commit

Permalink
Merge pull request #12 from phihag/patch-12
Browse files Browse the repository at this point in the history
map&filter: PEP8
  • Loading branch information
yasoob committed Aug 17, 2015
2 parents aa96166 + c7fe87d commit 91a2253
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions map_&_filter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ the blueprint:

.. code:: python
map(functions_to_apply, list_of_inputs)
map(function_to_apply, list_of_inputs)
Most of the times we want to pass all the list elements to a function
one-by-one and then collect the output. For instance:
Expand Down Expand Up @@ -65,8 +65,8 @@ function returns true. Here is a short and consise example:

.. code:: python
number_list = range(-5,5)
less_than_zero = list(filter(lambda x: x<0, number_list))
number_list = range(-5, 5)
less_than_zero = list(filter(lambda x: x < 0, number_list))
print(less_than_zero)
# Output: [-5, -4, -3, -2, -1]
Expand Down

0 comments on commit 91a2253

Please sign in to comment.