@0 I'd suggest writing the #python code like this:

```
>>> a = [1, 2, 3]
>>> list(map(lambda i: i+10, a))
[11, 12, 13]
>>> # or
>>> [i+10 for i in a]
[11, 12, 13]
>>>
```

Follow

@masipcat @0@mamot.fr the second one is more pythonic - list comphrehensions rule!

· · Web · 0 · 0 · 1
Sign in to participate in the conversation
Mastodon for Tech Folks

This Mastodon instance is for people interested in technology. Discussions aren't limited to technology, because tech folks shouldn't be limited to technology either!