I am making a hangman game and I want to be able to replace the list of original words with a list of new words typed in by the user. At the minute my code is this:
gamewords[:] = newgamewords[:]
But this does not seem to work...
The original list is this:
gamewords= ['blue','violet','red','orange','fuchsia','cyan','magenta','azure','black','turquoise','pink','scarlet']
A word is then chosen for the list randomly
word=gamewords[random.randint(0,len(gamewords)-1)]
i want to change it so that the word is chosen from the new list, how do i do this?
gamewordswith the elements fromnewgamewords- show us your current code and tell us why it doesn't work.gamewords = newgamewordsshould work fine.