Sort Alphanumeric String in Python

Hi,
Need help. To sort list of Alphanumeric Values. Getting wrong outputs or no output.


Sort Alphanumeric List.gh (18.7 KB)

Regards,
Ranjit

Hi,

With Python you can do something like this to sort the alphanumeric values:

This should work for all cases where the alphanumeric strings are composed of a single letter, followed immediately by one or more digits.

Sort Alphanumeric List rev.gh (14.3 KB)

1 Like

Hi Diff-arch .
thanks for help it worked.

Just to add options, one could also get the integer part and sort by that directly:


Sort Alphanumeric List rev_AHD.gh (14.9 KB)

1 Like