Skip to content

Commit

Permalink
Update python.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nkoroste authored Dec 13, 2024
1 parent ba8295c commit 2945dc8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions python.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,7 @@ unique = {x for x in lst if x > 0}
filtered = [x for x in lst if x > 0]
transformed = list(map(str, lst))

[fn(i)
for i in list] # .map
[fn(i) for i in list] # .map
map(fn, list) # .map, returns iterator

filter(fn, list) # .filter, returns iterator
Expand Down

0 comments on commit 2945dc8

Please sign in to comment.