How do I spawn a random prefab?

I want to spawn a random prefab from my list. The prefabs are players such as a Ninja or a Cyborg. So when the game starts, a player prefab from my list is spawn that the player can control. So every time the player dies, another prefab from the list will be spawned. So it will go on and on, but I’m not sure how I can accomplish this. Can someone please help me?

Take a look at Random.Range.

Transform[] prefabs;

void SpawnANewOne() {
  int index = Random.Range(0, prefabs.Count);
  Transform randomPrefab = prefabs[index];