🚀 Hurry! Offer Ends In
00 Days
00 Hours
00 Mins
00 Secs
Enroll Now
X

random.shuffle() method किस data type की value accept करता है?

random.shuffle() method accepts the value of which data type?

A
Integer / पूर्णांक
B
String / स्ट्रिंग
C
List / लिस्ट
D
Tuple / टपल
Explanation

random.shuffle() सिर्फ list पर काम करता है क्योंकि list mutable होती है (उसे बदला जा सकता है)।
Strings और tuples immutable होते हैं, इसलिए उन्हें shuffle नहीं कर सकते सीधे।

random.shuffle() works only with lists because lists are mutable (can be changed).
Strings and tuples are immutable, so they can’t be shuffled directly.


अगर string या tuple को shuffle करना हो, तो पहले उसे list में बदलें।

Correct Answer: C) List / लिस्ट

Latest Updates