Hi everyone,
I have a question to Dynamo.
I need to create from list with elements, another list with correspondiing number. Wery important is that the list number must be always from 1 to element numbers in list (1,2,3,4,5 if there is 5 elements)
Let us assume such names in the first list:
“sun”,“moon”,“sky”,“star”,“space” - that is the main order
there is always that names but sometimes ther are all sometimes only tree etc
Example:
list0:
(sun,sky,moon,moon,space) - the lsit i need is (1,4,2,3,5)
list1:
(moon,space,star) - (1,3,2)
list3:
(sun,sun,space,space,moon) - (1,2,4,5,3)
I know that it is probably only possible in python or some difficult codeblock but I dont know ho to make it. Please help.
Thanks in advance.