performance - python: Is it better to have one proper for loop or several oneliner for loops -


i have several lines of python code this:

myvar1 = np.array([d['key1'] d in d[0]['log']]) 

all keys/values have same length.

is better (performance/cpu/memory) make single loop , import them, or better several 1 liners?

what think?

you can use timeit , measure it.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -