

InterviewSolution
Saved Bookmarks
1. |
What does random.shuffle(x) do when x = [1, 2, 3]?(a) error(b) do nothing, it is a placeholder for a function that is yet to be implemented(c) shuffle the elements of the list in-place(d) none of the mentionedThis question was posed to me during an interview for a job.The query is from Random Module topic in division Mapping Functions and Modules of Python |
Answer» Correct CHOICE is (c) shuffle the ELEMENTS of the list in-place |
|