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

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -