Is there something similar in Python that I would use for a container that's like a vector and a list?
Any links would be helpful too.
Is there something similar in Python that I would use for a container that's like a vector and a list?
Any links would be helpful too.
You can use the inbuilt list - underlying implementation is similar to C++ vector. Although some things differ - for example, you can put objects of different type in one and the same list.
http://effbot.org/zone/python-list.htm
Have a look at Python's datastructures page. Here's a rough translation:
Lists are sequences.
see http://docs.python.org/tutorial/datastructures.html
append is like push_back, see the other methods as well.
Python also has as part of the standard library an array type which is more efficient and the member type is constrained.
You may also look at numpy (not part of the standard library) if you need to get serious about efficient manipulation of large vectors/arrays.