creating list of empty lists - Python -


test = [[none e in range(1)] e in range(len(foobar)/2)] delete in range(0,len(test)):         del test[delete][0] 

this not pythonic way create empty list

would suggest else?

i know question explains it. not duplicate of previous 1 can see.

does want?

test = [[] e in range(len(foobar)/2)] 

it has same output code


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -