Storing Face Indices in Data Arrays I am fairly new to python scripting in Blender. I am creating a tool for my workflow and can't seem to figure out several elements, although I do know how to do them in other languages.

I can get the index numbers of the faces in an object. How would I store faces selected in a variable or array that can be accessed after edit mode is exited?
If you store the list of indices in a list object (array), it will be accessible even after the object is no longer in edit mode.

import bpy, bmesh

o = bpy.context.object

# Create bmesh object. This particular method requires that the object will be in edit mode.
bm = bmesh.from_edit_mesh( o.data )

# Store list of selected face indices in object (will be empty if not face is selected)
selected_faces_list = [ f.index for f in bm.faces if f.select ]

# Go to object mode
bpy.ops.object.mode_set( mode = 'OBJECT' )

# Print content of list to show that it still contains face indices although we are now in object mode
print( selected_faces_list )