Create same value in sublist

Hello Everyone,
I try to create a same value in sublist. And the sequence of number will be in list. Can anyone please help this?

@dpradeep5110 Here’s one way

1 Like

@dpradeep5110 Another option:

1 Like

@Kai, @AmolShah thanks for you help.

1 Like

Hi, Above is quite fine. But I need this :point_down: I have some nested families I try to take the schedules. But in my case I can’t filter it out for the reason I try to add a dummy parameters. In the below list 23 are the 2 families (same family) and 3 is 1 family (another family). For the same family I need to feed the information as sequence for ex (1, 2). and the 2nd one in the list should be (1).

@dpradeep5110 Not sure if I follow your explanation but see if this helps:

master = []
out = []
for i in IN[0]:
	master.append(i)
	out.append([master.count(i)]*i)
	
OUT = out

@AmolShah Thanks. I am looking for it.

@dpradeep5110

master = []
out = []
for i in IN[0]:
	master.append(i)
	out.append(master.count(i))
	
OUT = out

Or you can do something like this with OOTB nodes but it will distort your element order.

Yes I want this. Thanks for your help.But I need to rearrange element order it is possible?