How to get a list of UV coordinates

You may need to get a list of coordinates of the mesh’s UV, for example, when exporting a mesh from Blender’s internal format to any external formats.

A list of the mesh UV-s can be got by accessing the “uv_layers” structure: