Unpack right side of assignment in python

时间:2015-07-28 17:01:00

标签: python

Often, I need to a few empty lists (when doing some experiments in ipython that are meant to by tried and forgotten). Is there something elegant way to do:

list1,list2,list3,list4 = [],[],[],[]

I have in mind something like

l1,l2,l3,l4 = *[]

which does not work of course.

0 个答案:

没有答案