Using Integer as Array Name in Python -
I would like to convert an integer to an array name in Python. I do not know that this is also possible. Assistance is highly appreciated.
a = int (10) Print ["1"] should come back & gt; & Gt; 10 ["1"]
I do not even think eval
This will do (though you do not want to do this anyway) Your best bet is to use a dict
, which can make an integer in a key.
int_dict = {} int_dict [10] = ["1"]
However, I believe your use case is a bit misleading. You want different list content.
Comments
Post a Comment