How to get vertex position and connected vertices?

Hi, I’m new to Blenders bpy but I am familiar with Python.
Once I have selected a mesh and saved a list of its vertices, I can select a single one from the list and process it. The way I want to process it requires me to get its position (local or global) and a list of connected vertices, how can I do that?


Have you tried to use bmesh?

import bmesh

mesh =  # object must be a mesh and in EditMode

bm = bmesh.from_edit_mesh(mesh)
for vert in bm.verts:
    for l in vert.link_edges:
    print("Vertex[", vert.index, "]:")
    print("\tco: ",
    print("\tlinks: ", vl)

Didn’t even know about it, thank you very much.