When I use resize(int newsize) in C++ for vector, it means that the size of this vector are set to newsize
resize(int newsize)
vector
size
newsize
A list doesn't have a finite size.
Is there a reason why the size matters to you?
Perhaps an array or a dictionary is closer to your requirements