Unreal Python - Export Selected

since 4.26 we are on python 3+ so you need to put parenthesis for the print. It is a function

if you copy paste directly what Rayvneye did then your python script just define a function but does not call it.
So you need to add a line at the very end like

     result = unreal.Exporter.run_asset_export_task(task)
     print('Export Result: {}'.format(result))

export_selected_fbx("D:/temp/export.fbx")