4 ms·
How so? Comprehensions vs loops vs recursive functions vs in some cases map/reduce/filter is the only example I can think of.
by codetrotter 9y ago
How so? Comprehensions vs loops vs recursive functions vs in some cases map/reduce/filter is the only example I can think of.
- strkek 9y agoThere's also strings. 'foo ' + bar 'foo {}'.format(bar) 'foo %s' % bar f'foo {bar}'
- BerislavLopac 9y agoAs well as the string templates almost nobody knows about (https://docs.python.org/3.6/library/string.html#template-strings https://docs.python.org/3.6/library/string.html#template-str...): Template('$foo bar').substitute(foo='foo')