Is the a module I can input a list to?


#1

I'm looking to input a list of specific numbers and then be able to random chose from those numbers?

Ideally the list could be a text file or something like that

Any help appreciated


#2

Use a table attribute, let's say `mytable'. There you can input a comma separated list. Then you can read the entire list into an array as in

myarray[maximumnumber] = {attr_mytable}

The maximumnumber can be bigger than the actual number of elements in your list, just not smaller. You can then read random elements from that array. You can do the same with a `text' attribute if you need a long list and find that easier.


#3

thank for the help mate