Your job is not sexy
d.gould.in48 pointsby dgouldin33 comments
>>> sum([['a', 'b', 'c'], ['d', 'e', 'f']], [])
['a', 'b', 'c', 'd', 'e', 'f']
This makes use of the optional start argument and list add operator. However, Python's docs suggest using itertools.chain instead: >>> import itertools
>>> [l for l in itertools.chain(*[['a', 'b', 'c'], ['d', 'e', 'f']])]
['a', 'b', 'c', 'd', 'e', 'f']
(Of course you lose the benefit of a generator by using a list comprehension, but this is just an example.)
I don't want to interrupt a good flame war, but I am just a normal dude who posted a tweet about a hack project and was asked by Twilio to write a post about it after the tweet got popular.
I prefer not to post pictures of my kids publicly out of respect for their privacy, so I won't prove to you that I'm a dad, but some cursory twitter-stalking should provide sufficient evidence that I'm not a marketing shill for either AWS or Twilio.