Using Director > Writing Scripts with Lingo > Using lists > Adding and deleting items in a list |  |

Adding and deleting items in a list

You can add or delete items in a list by using the following commands.

| To add an item at the end of a list, use the `append` command. See `append`.
| To add an item at its proper position in a sorted list, use the `add` or `addProp` command. See `add` and `addProp`.
| To add an item at a specific place in a linear list, use the `addAt` command. See `addAt`.
| To add an item at a specific position in a property list, use the `addProp` command. See `addProp`.
| To delete an item from a list, use the `deleteAt`, `deleteOne`, or `deleteProp` command. See `deleteAt`, `deleteOne`, and `deleteProp`.
| To replace an item in a list, use the `setAt` or `setaProp` command. See `setAt` and `setProp`.

You do not have to explicitly remove lists. Lists are automatically removed when they are no longer referred to by any variable.