Report Bug

Qus

What will be the output of the following Python function (random module has already been imported)?

random.choice('sun')

Qusनिम्नलिखित पायथन फ़ंक्शन (रैंडम मॉड्यूल पहले से इम्पोर्ट किया गया है) का आउटपुट क्या होगा?


A. sun
B. u
C. either s, u or n
D. error


Solution
C. either s, u or n



Explanation
The above function works with alphabets just as it does with numbers. The output of this expression will be either s, u or n.
CCC Online Test Python Programming Tutorials Best Computer Training Institute in Prayagraj (Allahabad) Online Exam Quiz O Level NIELIT Study material and Quiz Bank SSC Railway TET UPTET Question Bank career counselling in allahabad Best Website and Software Company in Allahabad Website development Company in Allahabad