List Selected Faces Individually

hello,

im trying to list a face selection to then use in the next stage of the code.

string $face[] = ls -sl; will list the selected faces, however, if there is a range, say face 4, 5 and 6, it'll make a single list item pCube1.f[4:6] instead of 3 items pCube1.f[4] pCube1.f[5] pCube1.f[6].

how can i list each selected face individually?

thanks for any help you can offer.

ls -sl -flatten

Thanks for the reply .