# How can I randomly select an item from a list in Python?

To randomly select an item from a list in Python, you can use the `random.choice()` function from the `random` module. This function takes a list as an argument and returns a randomly selected element from the list.

Here is an example of how you can use `random.choice()`:

<iframe width="100%" height="315" src="https://www.youtube.com/embed/UviMQ7Muuko?si=Bj89eJfSzTA38oNY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>


```bash
import random

# List of items
items = ['apple', 'banana', 'cherry', 'date', 'elderberry']

# Select a random item
selected_item = random.choice(items)

print(selected_item)
```

This code will output one of the items from the `items` list at random. The item that is selected will be different each time the code is run.

Note that you will need to import the `random` module at the beginning of your code in order to use the `random.choice()` function.