How do I get a list of vertices of a mesh?

Do you know if there is an example of how I can get the world positions of each vertex?

I tried also the example here but it just gives local positions too.