Vertices coords and edges exporting
Each edge contains the vertex index of the two vertices that it connects. Similarly each face contains a list of vertices defining it.

import bpy

obdata = bpy.context.object.data

print('Vertices:')
for v in obdata.vertices:
    print('{}. {} {} {}'.format(v.index, v.co.x, v.co.y, v.co.z))

print('Edges:')
for e in obdata.edges:
    print('{}. {} {}'.format(e.index, e.vertices[0], e.vertices[1]))

print('Faces:')
for f in obdata.polygons:
    print('{}. '.format(f.index), end='')
    for v in f.vertices:
        print('{} '.format(v), end='')
    print() # for newline