I wrote a script that at one point generates a bunch of empty lists applying a code with the structure:
A,B,C,D=[],[],[],[]
which produces the output:
A=[]
B=[]
C=[]
D=[]
The way it is right now, I have to manually modify the letters each time I use a different dataset as an input. I want to be able to automatize that.
I thought about doing this:
FieldList=[A,B,C,D]
bracket=[]
[[0]for field in FieldList]
for field in FieldList:
bracket=bracket+["[]"]
FieldList=bracket
Here I was trying to replicate " A,B,C,D=[],[],[],[]", but evidently that's not how it works.
I also tried:
FieldList=[A,B,C,D]
bracket=[]
[[0]for field in FieldList]
for field in FieldList: