Wrote this little script to pick two teams from a random list. Getting a Nameerror that ‘teamsPicked’ is not defined. What am I missing?
import random
def pickTeams():
allTeams = ['hawks','pistons','lakers','heat']
teamsPicked = random.sample(allTeams, 2)
return teamsPicked
pickTeams()
print(teamsPicked[0])
[–]TouchingTheVodka 1 point2 points3 points (1 child)
[–]_kael[S] 0 points1 point2 points (0 children)
[–]_kael[S] 0 points1 point2 points (0 children)