How can v get the selected edges/vertices in the SELECTION ORDER? ls -sl returns in the alphabetical order only.
ls -sl
Maya doesnt store the order of component selection. So you really can not.
If the amount of selected is small you can parse the data form undo. The real solution is however to make a scriptCtx that collects the data.