Problems with the list (Rookie)

Hi Guys.

I got problems to get my list done.

My trouble is i cant get the PF with the numbers in order, starting from 1 - 20

Hope you guys can help me.

Best Regards Peter

Hi, and welcome!

You could use list Sort Natural from the geniusloci package, and then rearange the list of elements with a dictionary (springs package)
Below is an example i used for another user but it’s the same thing :slight_smile:

Thanks so much for the fast answer - i will try and let you know if its working :slight_smile:

If they all have PF in the code, use string.replace to remove the PF part then string.tonumber and you can then sort that list as numbers or use it as the keys and your PF or elements list you had before as the values in list.sortbykey

Hey @Peter_2023
You can simply use List.GroupBykeys Node It will give you excatly output that you want
Or
As you have added the List.Sort node
after this you can use Indexof node from RIE package to get the exact element