how to randomly choose from a list python

random.choice(name of list)

Here is what the above code is Doing:
1. We’re creating a list of names.
2. We’re using the random module to choose a random name from the list.
3. We’re printing the chosen name to the console.

You can use the random module to choose a random element from any list, tuple, or set.