trying to create a deep array in python, able to get the output below line is executed in shell, but not when I run from the Program -
my code:
output =[] [[[output.append("") counter1 in range(0,len(total_columns)+16,1)]for counter2 in range(0,deprication_range,1)]for counter3 in range(0,len(total_data),1)]
total_columns , total_data arrays have lengths 21 , 2 respectively , deprication_range integer 7
please let me know if making kind of silly mistake. beats me..i suppose doing fundamentally incorrect not able identify..
thanks in advance.
cheers, ajay
you wouldn't append output inside of list comprehension. can change output.append("") "" , run
output = [[["" counter1 in range(0,len(total_columns)+16,1)]for counter2 in range(0,deprication_range,1)]for counter3 in range(0,len(total_data),1)]
Comments
Post a Comment