How to access a mark_seam loop?

I select edges loop.
Next, I did a Mark seam.

Then,
How to access a mark seam loop through bpy?

Reason is i want to select all edges of seam loop by one click.

Please answer to me.
Thank you.

With obj as your object:


edges = obj.data.edges
for i in edges:
     if i.select:
         i.use_seam = True

Thanks for your help.
I feel good know more a knowledge.