I'm currently iterating through a dictionary and creating a list of strings, each one composed of a key / value from the dictionary, using this:
listA.append(attributesA + " " + thisObjectA.attributes[attributesA])
This gives me something like this:
['model taurus', 'make ford', 'color white']
I need to be able to reference a particular string in the list by index number or possibly by the first few letters in the string. I think what I want to do is use an array instead of a list. Not only will I be referencing multiple strings, from multiple arrays, I'll need to update certain strings with new strings. Would it be better if I used numpy for this?
Could you please suggest the best way to use an array instead of a list for this?
np.asarray(listA). Just to answer your particular flavourkeysorvaluesof what you are looking for and eliminate this entire process, dictionaries are very useful, maybe post a question on how to get the results you desire using the dictionaries you already have created