The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
Question #333
fruit=['apple', 'banana', 'papaya', 'cherry']
The standard library function to shuffle a list in place is random.shuffle() . Ther others won't work! (docs.python.org/3/library/random.html)
What is the correct command to shuffle the list below?
— The Python Quiz (@thepythonquiz) September 20, 2020
fruit=['apple', 'banana', 'papaya', 'cherry']
random.shuffle(fruit)
fruit.shuffle()
random.shuffleList(fruit)
shuffle(fruit)#python #python3 #pythonprogramming #learnpython
Question difficulty: π΅π΅π΅π΅π΅
Similar questions: