I was wondering if there is a C++ "map"-like thing in Python. For example if I have 10^9 items and each one needs to hold one value: True or False (only the "True"-values are meaningful, but in order to check fast and not in O(n^2)), my code is very inefficient:
for k in range(0, numberOfItems):
myList.append([False])
I can check the value is True or False, but with larger numbers, like 10^9, I get a runtime error because of the list size. It just can't hold that many items. Any help would be appreciated, thanks in advance!