Random-access container for strings in python?
-
02-11-2019 - |
문제
I manipulate with indexed instances (say, music tracks) and have to lookup object's name by its index (int->string). Dicts are too slow (I have about 10M objects). Memory is not a problem, so the most convinient solution would be to create a random-access array of strings from csv file with names.
However, I have failed to make this in python -- I got an error that 0-dim arrays (strings) couldn't be indexed. What's the native python way to create random access container for strings?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow