Message 1 of 3
For/while loop to produce a single list by iterating through
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am trying to append a specific number of items to an existing list. In the example in the image below the list “a” has one item (0001) and then I append 2 more items (0002 and 0003).
The number of items to append is known but can vary, so I am looking to a way (for / while loop?) that can append that variable number of items and produce one single list.
For example, if I have 5 items, I need to create a list that would iterate through the values of 0-4 and produce the list:
0001 [n=0]
0002 [n=1]
0003 [n=2]
0004 [n=3]
0005 [n=4]
which would be the result of evaluating
x[0][8]
x[1][8]
x[2][8]
x[3][8]
x[4][8]
(iterating though x[n][8])
All help appreciated. Thanks.