teach-ict.com logo

THE education site for computer science and ICT

3. Lists cont.

As well as ordered lists, you can have unordered lists. These work in a similar way, but do not have any rules about where particular elements are stored. The position of elements is down to when they were added to the list.

For example, an online shopping cart where you can continue to add items. Each item will be placed sequentially after the last item - there is no particular order to the items in the list.

List actions

There are a number of standard actions or processing that can be carried out on a list. These include

  • Creating list
  • Deleting list
  • Appending to list
  • Inserting into list
  • Removing from list
  • Search a list
  • Sort a list
  • Iterating through a list

.

 

Challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: What is a list in programming?