A list is an ordered collection of items or objects. In computer science, list are often implemented as arrays and linked lists.
Converting into storageEdit
Generally, the more efficient way to store a list is by using text files. Ways to do this are:
- Use simple enumeration of the values in the list, separated with a defined separator.
- While considering this method, you must also consider whether the separator would appear in the items, unless it would break the list. For example, for a list of integers, you can consider newline characters and spaces. For a list of strings, you should consider if it's possible for one of them to have a newline. If not, you can use the newline character as a separator.
- If you can't think of a character to separate them, you can use either control codes or escape sequences.
- Use a comma-separated list, which is essentialy a single row of a comma-separated table. See comma-separated values.