To shuffle the list(say list1) what function do we use ?
a) list1.shuffle ()
b) shuffle(list1)
c) random.shuffle(list1)
d) random.shuffleList(list1)

1 Answer

Answer :

c) random.shuffle(list1)

Related questions

Description : To add a new element to a list we use which command ? a) list1.add(5) b) list1.append(5) c) list1.addLast(5) d) list1.addEnd(5)

Last Answer : a) list1.add(5)

Description : Which of the following commands will create a list? a) list1 = list() b) list1 = []. c) list1 = list([1, 2, 3]) d) all of the mentioned

Last Answer : d) all of the mentioned

Description : To remove string “hello” from list1, we use which command ? a) list1.remove(“hello”) b) list1.remove(hello) c) list1.removeAll(“hello”) d) list1.removeOne(“hello”)

Last Answer : d) list1.removeOne(“hello”)

Description : To insert 5 to the third position in list1, we use which command ? a) list1.insert(3, 5) b) list1.insert(2, 5) c) list1.add(3, 5) d) list1.append(3, 5)

Last Answer : a) list1.insert(3, 5)

Description : What is the output when following code is executed ? >>>list1 = [11, 2, 23] >>>list2 = [11, 2, 2] >>>list1 < list2 is a) True b) False c) Error d) None

Last Answer : b) False

Description : Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is : a) [0, 1, 2, 3]. b) [0, 1, 2, 3, 4]. c) [0.0, 0.5, 1.0, 1.5]. d) [0.0, 0.5, 1.0, 1.5, 2.0].

Last Answer : c) [0.0, 0.5, 1.0, 1.5].

Description : Suppose list1 is [1, 3, 2], What is list1 * 2 ? a) [2, 6, 4]. b) [1, 3, 2, 1, 3]. c) [1, 3, 2, 1, 3, 2] . D) [1, 3, 2, 3, 2, 1].

Last Answer : c) [1, 3, 2, 1, 3, 2] .

Description : Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1] ? a) [2, 33, 222, 14]. b) Error c) 25 d) [25, 14, 222, 33, 2].

Last Answer : a) [2, 33, 222, 14].

Description : Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1] ? a) Error b) None c) 25 d) 2

Last Answer : c) 25

Description : Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], which of the following is correct syntax for slicing operation? a) print(list1[0]) b) print(list1[:2]) c) print(list1[:-2]) d) all of the mentioned

Last Answer : d) all of the mentioned

Description : Suppose list1 is [1, 5, 9], what is sum(list1) ? a) 1 b) 9 c) 15 d) Error

Last Answer : c) 15

Description : Suppose list1 is [3, 5, 25, 1, 3], what is min(list1) ? a) 3 b) 5 c) 25 d) 1

Last Answer : d) 1

Description : Suppose list1 is [2445, 133, 12454, 123], what is max(list1) ? a) 2445 b) 133 c) 12454 d) 123

Last Answer : c) 12454

Description : Is shuffle, in iTunes, actually random?

Last Answer : No. As the randomness is generated by a computer and computers find it very hard to generate truly random sequences. iTunes can be set to select higher rated songs more often by checking the box “play higher rated songs more often” (obviously) on the party shuffle screen.

Description : You have to sort a list L, consisting of a sorted list followed by a few ‘random’ elements. Which of the following sorting method would be most suitable for such a task ? (A) Bubble sort (B) Selection sort (C) Quick sort (D) Insertion sort

Last Answer : (D) Insertion sort

Description : How does randomized hill-climbing choose the next move each time? (A) It generates a random move from the moveset, and accepts this move. (B) It generates a random move from the whole state ... move from the whole state space, and accepts this move only if this move improves the evaluation function.

Last Answer : (C) It generates a random move from the moveset, and accepts this move only if this move improves the evaluation function. 

Description : There are three cards in a box. Both sides of one card are black, both sides of one card are red, and the third card has one black side and one red side. We pick a card at random and observe only one side. What is the ... the same colour as the one side we observed? (A) 3/4 (B) 2/3 (C) 1/2 (D) 1/3 

Last Answer : (B) 2/3

Description : What is the difference between a sequential file and a random file?

Last Answer : Ans: Sequential file access is the method employed in tape drives where the files are access in a sequential manner. So if you have to get a file in the end of the tape you have to start ... Disks and Optical drives, wherever the files is placed it will go to that particular place and retrieve it.

Description : A portion of the Polymorphic virus, generally called a …………………….. , creates, a random encryption, key to encrypt the remainder of the virus. A) mutual engine B) mutation engine C) multiple engine D) polymorphic engine

Last Answer : C) multiple engine

Description : In the ………………… mode any record in the file can be accessed at random A) Sequential access B) Random access C) Standard access D) Source access

Last Answer : B) Random access

Description : Beam-penetration and shadow-mask are the two basic techniques for producing color displays with a CRT. Which of the following is not true ? I. The beam-penetration is used with random scan monitors. II. Shadow-mask is used ... -penetration method. (A) I and II (B) II and III (C) III only (D) IV only

Last Answer : (C) III only

Description : A computer program selects an integer in the set {k : 1 ≤ k ≤ 10,00,000} at random and prints out the result. This process is repeated 1 million times. What is the probability that the value k = 1 appears in the printout atleast once ? (A) 0.5 (B) 0.704 (C) 0.632121 (D) 0.68

Last Answer : (C) 0.632121

Description : What is the best method to go for the game playing problem? (1) Optimal Search (2) Random Search (3) Heuristic Search (4) Stratified Search 

Last Answer : (3) Heuristic Search

Description : eclipse mp3 player how do we put it in shuffle mode?

Last Answer : Press and hold the OK/VOL button for 3 seconds to enter the Music Submenu. Select "repeat" to adjust your repeat mode. You can select Sequence, repeat one, repeat all, shuffle, or shuffle and repeat.

Description : In C++, the keyword void was used ……….. A) To specify the return type of function when it is not returning any value. B) To indicate an empty argument list to a function. C) To declare the generic pointers. D) All of the above.

Last Answer : D) All of the above.

Description : Does the latest ipod shuffle have a sleep timer (or shut off after a certain amount of time)?

Last Answer : Unfortunately, no. As there’s no display and no way to access any kind of settings, there’s no documented way for activating a sleep timer on the Shuffle.

Description : Where to I find out battery life and other stats on last years iPod shuffle?

Last Answer : Apple advertised the battery life as “up to 12 hours” however the unit MacWorld reviewed played for around 16 hours.

Description : Does anyone else have a problem with their IPOD shuffle holding a charge?

Last Answer : I never had this issue with my shuffle, though I do know that it does not need to be charging all night, maybe that's your problem right there. Maybe by over-charging it is losing battery life when ... it dies. But then again your friend's being brand new and having the same issue is a bit weird.

Description : What do you think of the latest redesign of the iPod shuffle?

Last Answer : Some people have no room in their pockets and need the tiniest player available.

Description : Any opinions on new talking shuffle?

Last Answer : I think it might be helpful if someone has vision problems or had to work in a darkroom. Other than that, it doesn’t really hold much and you have to use their headphones. I won’t be buying one.

Description : Who has seen the new talking iPod shuffle?

Last Answer : I had not seen this before your post. Man that's small! Dangerously so I feel - smaller than a battery may be small enough to be swallowed. And that voiceover feature is funny, but I wouldn't like to ... they have a remote that lets you use any set of headphones, I wouldn't be able to control it!

Description : Does Nike plus work with the shuffle?

Last Answer : To the best of my knowledge, it only works with the iPod Nano. I really wish they would come out with an App for the iPhone and iPod Touch! The shuffle usually is much smaller in memory and doesn’t have as many user controls, so that would probably not work well with Nike+.

Description : How do I know what generation my iPod Shuffle is?

Last Answer : as they changed shuffles through the years, they changed hard drive capacity as well as the color of the shuffle . if it was purchased new from a local retailer, i’d imagine that it would be the latest generation. check this site out and see if it can help. link

Description : I-pod Shuffle not showing up in itunes?

Last Answer : Its ok everyone, I fixed it. But thanks for your suggestions.

Description : Why doesn't the iPod have the "Party Shuffle" feature that iTunes does? Could it really be THAT difficult to include it, or is it too intuitive?

Last Answer : I think pretty much anything iTunes supports is going to be possible on the iPod Touch sooner or later. But as for now…nope…it’s just a matter of Apple rushing to get things done and not taking the time to make those extra features.

Description : My iphone's ipod seems to permanently on be on shuffle mode... is there any way to turn this off?

Last Answer : answer:Nope, sorry Noah. They only built in an ‘on’ switch for shuffle – once it starts, there’s no way to stop it… ;)

Description : I have many colors, but I am not a rainbow. I am a cube, but I am not a box. You can shuffle me around, but I'm almost impossible to solve. What am I? -Riddles

Last Answer : A Rubik's cube!

Description : How to shuffle n numbers in Python -Web-Development

Last Answer : answer:

Description : Python: How to shuffle two related lists (training data and labels ) in the same order -Web-Development

Last Answer : answer:

Description : What word comes in alphabetical order shudder shuffle shutshutdownshuttle?

Last Answer : Need answer

Description : Where is it recommended to set up a shuffle board table?

Last Answer : I would set-up a shuffle board table where you have plenty of space around you. Also, make sure there are no breakables around as well.

Description : How was the musical Shuffle Along instrumental in Hughes’s move to Harlem?

Last Answer : great

Description : The framework groups Reducer inputs by key in _________ stage. a) sort b) shuffle c) reduce d) none of the mentioned

Last Answer : sort

Description : Where does a computer add, compare and shuffle data ? (1) Memory chip (2) CPU chip (3) Floppy disk (4) Hard disk 

Last Answer : CPU chip

Description : What is the output when we execute list(“hello”)? a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’]. b) [‘hello’]. c) [‘llo’]. d) [‘olleh’].

Last Answer : a) [‘h’, ‘e’, ‘l’, ‘l’, ‘o’].

Description : Why do we have main() function?

Last Answer : A: The execution of the program begins from the main() method.

Description : State true of false. i) We cannot make the function inline by defining a function outside the class. ii) A member function can be called by using its name inside another member function of the same class, this ... of member function. A) True, True B) True, False C) False, True D) False, False

Last Answer : C) False, True

Description : To accept 100 different values into the array we require A) Loop B) If condition C) Function D) Structure

Last Answer : A) Loop

Description : Verification: (A) refers to the set of activities that ensure that software correctly implements a specific function. (B) gives answer to the question - Are we building the product right ? (C) requires execution of software (D) both (A) and (B)

Last Answer : (D) both (A) and (B)

Description : Which of the following is incorrect in C++ ? (A) When we write overloaded function we must code the function for each usage. (B) When we write function template we code the function only once. (C) It is difficult to debug macros (D) Templates are more efficient than macros

Last Answer : (D) Templates are more efficient than macros