निम्नलिखित सूची में फेरबदल करने के लिए सही कमांड क्या है?
What is the correct command to shuffle the following list?
fruit=['apple', 'banana', 'papaya', 'cherry']
A)
B)
C)
D)
Explanation:
To shuffle a list in Python, you need to use the shuffle
function from the random
module. The correct command is:
random.shuffle(fruit)
So, the correct answer is (C) random.shuffle(fruit).