Print a list of strings by varying amounts

Hi People,

I am trying to print a list of strings for varying times. My current code looks like this:

The output I am after is:
APAR1
APAR1
APAR1
APAR4
APAR4
APAR4
APAR1
APAR1

Any assistance is greatly appreciated. :slight_smile:

Check out this one:

https://www.pythonforbeginners.com/basics/list-comprehensions-in-python

Why not skip the Python and use a List.OfRepeatedItems node and leverage lacing and levels?

1 Like

I tried that but the output is a little weird. Check below:

My understanding of how the list trees work is limited. It is repeating the list of strings not repeating each string item by a specific number.

Perhaps I have the lacing settings incorrect?

Thank you for the hint Jacob Small. I experimented with reworked the lacing so now it works! see below:

1 Like