I have a var that looks like this: [36000, 38000, 40000]
I would like to split the var so I can use the elements separately.
Output would be:
Level1: 36000
Level2: 38000
Level3: 40000
I have a var that looks like this: [36000, 38000, 40000]
I would like to split the var so I can use the elements separately.
Output would be:
Level1: 36000
Level2: 38000
Level3: 40000
Try this out:
{var=[36000, 38000, 40000]}Level 1: {=var[1]}
Level 2: {=var[2]}
Level 3: {=var[3]}
Since your variable is storing the contents as a list, you can just refer to the position in the list to retrieve individual values from it. Additional details here
If you don't know how many items your list might have in it, you can get really fancy and use a repeat:
{var=[36000, 38000, 40000]}{repeat: for x in var}Level {=location(var, x)}: {=x}
{endrepeat}
That can handle a list of any length and avoids needing to name specific locations from the list
This works great! Thank you! As always a simple solution!