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?

Thanks!

Have you tried to use bmesh?

import bmesh

mesh = bpy.context.view_layer.objects.active.data  # object must be a mesh and in EditMode

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

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