Python: Create Array Objects Dynamically -


this question has answer here:

i want dynamically create arrays variable names array. have:

    array1 = ['a', 'b', 'c'] 

i want programatically create new array each value in array1 (where not know how many values in array1 , not know names in there) using names provided in array1. give me:

    = []     b = []     c = [] 

when array1 = [a,b,c], lose information names of variables used instantiate array, i'll assume meant array1=['a','b','c']. in python, use dictionary solve issues related this. using dictionary, can have mapping 'a' empty list so:

array1 = ['a','b','c'] dicty = {} in array1:     dicty[i] = [] 

if doesn't solve problem, please give me more information problem trying solve.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -