import random
warrior = 'Warrior'
mage = 'Mage'
warlock = 'Warlock'
paladin = 'Paladin'
firstList = [warrior, mage, warlock, paladin]
print(firstList[0], firstList[1], firstList[2], firstList[3])
firstNumber = random.randint(0, 3)
firstList[firstNumber] = '*taken*'
print(firstList[0], firstList[1], firstList[2], firstList[3])
secondList = [paladin, warlock, mage, warrior]
print(secondList[0], secondList[1], secondList[2], secondList[3])
Let's say the random number picks 0 I realized that the 9th line actually just changes the list entry to "taken", instead of changing the 'warrior' variable that entry refers to into "taken". Is there any way to do that?
Forgive the WoW references.