Node help

dynamo

#1

Hello Dyanomotizens.

I am trying to replace the value in my “main” list with a pool of (4) available values Randomly. I have tried the OOTB nodes for random, and it is not what I wanted.

I have pulled most of my hair out and now seeking help… How do I replace the value in the list with another value and do so randomly?

Thanks.


#2


not exactly what you asked though


#3

Thanks Marcel. Not what i was looking for. Maybe I can ask another question. How to I replace all the value in a list with another value.


#4

Can you not create a fresh list with new random values the same length as the original list.


#5

Hi @rye

Here is another possible way using dictionary in python:

You can replace numbers where i have put 10,20,30,40 inside python.
Good Luck!


#6

Or something similar to this? (with the output list structure flattened to match your input list structure for the set parameter node)