Menu mobile
Home
Programming
Python Tutorial
Java Tutorial
C Tutorial
C++ Tutorial
Web Technology
HTML
CSS
Java Script
PHP
React JS
Node JS
Assignment
MS Office
HTML
CSS
Bootstrap
Java Script
JQuery
AngularJs
Project
Blog
QUIZ ON : python - SEQUENCE DATA TYPES IN PYTHON
SEQUENCE DATA TYPES IN PYTHON
00:00:00
English
Hindi
Question No# :
01
out of 50
If a={5,6,7}, what happens when a.add(5) is executed?
यदि a = {5,6,7}, तो क्या होता है जब a.add (5) निष्पादित होता है?
A.
a={5,5,6,7}
a={5,5,6,7}
B.
a={5,6,7}
a={5,6,7}
C.
Error as there is no add function for set data type
एरर के रूप में सेट डेटा प्रकार के लिए कोई फ़ंक्शन नहीं है
D.
Error as 5 already exists in the set
5 के रूप में एरर पहले से ही सेट में मौजूद है
Question No# :
02
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('xyxxyyzxxy'.lstrip('xyy'))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('xyxxyyzxxy'.lstrip('xyy'))</span></pre>
A.
zxxy
zxxy
B.
xyxxyyzxxy
xyxxyyzxxy
C.
xyxzxxy
xyxzxxy
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
03
out of 50
What is the correct way to create a tuple with a single element?
किसी सिंगल एलिमेंट से टपल क्रिएट करने का सही तरीका क्या है?
A.
(1)
(1)
B.
(1,)
(1,)
C.
[1]
[1]
D.
{1}
{1}
Question No# :
04
out of 50
What will tuple('abc') return?
tuple('abc') क्या रिटर्न करेगा ?
A.
('abc’)
('abc’)
B.
('a', 'b', 'c’)
('a', 'b', 'c’)
C.
['a', 'b', 'c’]
['a', 'b', 'c’]
D.
Error
एरर
Question No# :
05
out of 50
Assume q= [3, 4, 5, 20, 5, 25, 1, 3], then what will be the items of q list after q.pop(1) ?
मान लीजिए q= [3, 4, 5, 20, 5, 25, 1, 3], तो q.pop(1) के बाद q सूची में क्या आइटम होंगे?
A.
[3, 4, 5, 20, 5, 25, 1, 3]
[3, 4, 5, 20, 5, 25, 1, 3]
B.
[1, 3, 3, 4, 5, 5, 20, 25]
[1, 3, 3, 4, 5, 5, 20, 25]
C.
[3, 5, 20, 5, 25, 1, 3]
[3, 5, 20, 5, 25, 1, 3]
D.
[1, 3, 4, 5, 20, 5, 25]
[1, 3, 4, 5, 20, 5, 25]
Question No# :
06
out of 50
Suppose d = {"john”:40, “peter":45}. To obtain the number of entries in dictionary which command do we use?
मान लीजिए d = {"john":40, “peter":45}| डिक्शनरी में प्रविष्टियों की संख्या प्राप्त करने के लिए हम किस कमांड का उपयोग करते हैं?
A.
d.size()
d.size()
B.
len(d)
len(d)
C.
size(d)
size(d)
D.
d.len ()
d.len ()
Question No# :
07
out of 50
<p>What will be the output of the following Python code?</p><pre>d = {0: 'a', 1: 'b', 2: 'c'}<br>for x in d.values():<br> print(d[x])</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d = {0: 'a', 1: 'b', 2: 'c'}<br>for x in d.values():<br> print(d[x])</pre>
A.
0 1 2
0 1 2
B.
a b c
a b c
C.
0 a 1 b 2 c
0 a 1 b 2 c
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
08
out of 50
<p>What is the output of the following code?</p><pre>dict={"Joey":1, "Rachel":2}<br>dict.update({"Phoebe":2})<br>print(dict)</pre>
<p>निम्नलिखित कोड का आउटपुट क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">dict={"Joey":1, "Rachel":2}<br>dict.update({"Phoebe":2})<br>print(dict)</pre>
A.
{'Joey': 1, 'Rachel': 2, 'Phoebe': 2}
{'Joey': 1, 'Rachel': 2, 'Phoebe': 2}
B.
{“Joey”:1,”Rachel”:}
{“Joey”:1,”Rachel”:}
C.
{“Joey”:1,”Phoebe”:2}
{“Joey”:1,”Phoebe”:2}
D.
Error
Error
Question No# :
09
out of 50
<p>What is the output of the following code:</p><pre><span style="font-size: 14px;">L=['a','b','c','d']<br></span><span style="font-size: 14px;">print ( "".join(L))</span></pre><div><br></div>
<p>निम्नलिखित कोड का परिणाम क्या है:</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">L=['a','b','c','d']<br></span><span style="font-size: 14px;">print ( "".join(L))</span></pre>
A.
Error
Error
B.
None
None
C.
abcd
abcd
D.
[‘a’,’b’,’c’,’d’]
[‘a’,’b’,’c’,’d’]
Question No# :
10
out of 50
which of the following are valid string manipulation function in python
निम्नलिखित में से कौन सा पायथन में मान्य स्ट्रिंग मैनिपुलेशन फ़ंक्शन है
A.
count()
count()
B.
strip()
strip()
C.
upper()
upper()
D.
उपरोकà¥à¤¤ सà¤à¥€
All of the above
Question No# :
11
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">>>>max("what are you")</span></pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">>>>max("what are you")</span></pre>
A.
what
what
B.
y
y
C.
a
a
D.
Error
Error
Question No# :
12
out of 50
To insert 5 to the third position in list1, we use which command?
लिस्ट 1 में 5 से थर्ड पोज़िशन पर इन्सर्ट करने के लिए, हम किस कमांड का यूज़ करते हैं?
A.
list1.insert(3, 5)
list1.insert(3, 5)
B.
list1.insert(2, 5)
list1.insert(2, 5)
C.
list1.add(3, 5)
list1.add(3, 5)
D.
list1.append(3, 5)
list1.append(3, 5)
Question No# :
13
out of 50
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse()?
मान लीजिए कि list1 [3, 4, 5, 20, 5, 25, 1, 3] है, list1.reverse () के बाद list1 क्या है?
A.
[3, 4, 5, 20, 5, 25, 1, 3]
[3, 4, 5, 20, 5, 25, 1, 3]
B.
[1, 3, 3, 4, 5, 5, 20, 25]
[1, 3, 3, 4, 5, 5, 20, 25]
C.
[25, 20, 5, 5, 4, 3, 3, 1]
[25, 20, 5, 5, 4, 3, 3, 1]
D.
[3, 1, 25, 5, 20, 5, 4, 3]
[3, 1, 25, 5, 20, 5, 4, 3]
Question No# :
14
out of 50
Which of the following is the correct way to check if a value exists in a list?
किसी लिस्ट में कोई मान मौजूद है या नहीं इसकी जाँच करने का निम्नलिखित में से कौन सा सही तरीका है?
A.
list.contains(value)
list.contains(value)
B.
list.index(value)
list.index(value)
C.
list.contains(value)
list.contains(value)
D.
value in list
value in list
Question No# :
15
out of 50
What is the output of the following code? print(len("Python\nProgramming"))
निम्नलिखित कोड का आउटपुट क्या है? print(len("Python\nProgramming"))
A.
19
19
B.
18
18
C.
17
17
D.
Error
एरर
Question No# :
16
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(d["john"])</span></pre><div><br></div>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">d = {"john":40, "peter":45}<br></span><span style="font-size: 14px;">print(d["john"])</span></pre>
A.
40
40
B.
45
45
C.
“john”
“john”
D.
“peter”
“peter”
Question No# :
17
out of 50
<p>What will be the output of the following Python code?</p> <pre><font color="#333333">x = ['ab', 'cd']<br></font><font color="#333333">for i in x:<br></font><font color="#333333"> i.upper() <br></font><font color="#333333">print(x)</font></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">x = ['ab', 'cd']<br></font><font color="#333333">for i in x:<br></font><font color="#333333"> i.upper() <br></font><font color="#333333">print(x)</font></pre>
A.
[‘ab’, ‘cd’]
[‘ab’, ‘cd’]
B.
[‘AB’, ‘CD’]
[‘AB’, ‘CD’]
C.
[None, None]
[None, None]
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
18
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">a= [1, 2, 3, 4, 5]<br></span><span style="font-size: 14px;">for i in range(1, 5):<br></span><span style="font-size: 14px;"> a[i-1] = a[i]<br></span><span style="font-size: 14px;">for i in range(0, 5):<br></span><span style="font-size: 14px;"> print(a[i],end = " ")</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a= [1, 2, 3, 4, 5]<br></span><span style="font-size: 14px;">for i in range(1, 5):<br></span><span style="font-size: 14px;"> a[i-1] = a[i]<br></span><span style="font-size: 14px;">for i in range(0, 5):<br></span><span style="font-size: 14px;"> print(a[i],end = " ")</span></pre>
A.
5 5 1 2 3
5 5 1 2 3
B.
5 1 2 3 4
5 1 2 3 4
C.
2 3 4 5 1
2 3 4 5 1
D.
2 3 4 5 5
2 3 4 5 5
Question No# :
19
out of 50
If a=(1,2,3,4), a[1:-1] is _________
यदि a = (1,2,3,4), एक [1: -1] _________ है
A.
Error, tuple slicing doesn’t exist
एरर,टप्पल स्लाइसिंग मौजूद नहीं है
B.
[2,3]
[2,3]
C.
(2,3,4)
(2,3,4)
D.
(2,3)
(2,3)
Question No# :
20
out of 50
Which of the following is not a declaration of the dictionary?
निम्नलिखित में से कौन सा ड़िक्शनरी का डिक्लेरेशन नहीं है?
A.
{1: ‘A’, 2: ‘B’}
{1: ‘A’, 2: ‘B’}
B.
dict([[1,”A”],[2,”B”]])
dict([[1,”A”],[2,”B”]])
C.
{1,”A”,2”B”}
{1,”A”,2”B”}
D.
{ }
{ }
Question No# :
21
out of 50
<p>What does the following code print ?</p><pre>x = 'mohan'<br>for i in range (len(x)):<br> x[i].upper()<br>print (x)</pre><div><br></div>
<p>निम्नलिखित कोड क्या प्रिंट करता है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">x = 'mohan'<br>for i in range (len(x)):<br> x[i].upper()<br>print (x)</pre>
A.
mohan
mohan
B.
MOHAN
MOHAN
C.
Error
Error
D.
None of These
None of These
Question No# :
22
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print(max("what are you"))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print(max("what are you"))</span></pre>
A.
error
एरर
B.
u
u
C.
t
t
D.
y
y
Question No# :
23
out of 50
Which one of the following is immutable data type ?
निम्नलिखित में से कौन सा इम्म्यूटेबल डेटा टाइप है?
A.
list
लिस्ट
B.
set
सेट
C.
tuple
टपल
D.
dictionary
डिक्शनरी
Question No# :
24
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in x:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> x.upper()</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = 'abcd'<br></span><span style="font-size: 14px;">for i in x:<br></span><span style="font-size: 14px;"> print(i)<br></span><span style="font-size: 14px;"> x.upper()</span></pre>
A.
a B C D
a B C D
B.
a b c d
a b c d
C.
A B C D
A B C D
D.
error
error
Question No# :
25
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">a.setdefault(4,"D") <br></font><font color="#333333">print(a)</font></pre><div><br></div>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">a.setdefault(4,"D") <br></font><font color="#333333">print(a)</font></pre>
A.
{1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}
{1: ‘A’, 2: ‘B’, 3: ‘C’, 4: ‘D’}
B.
None
कोई नहीं
C.
Error
एरर
D.
[1,3,6,10]
[1,3,6,10]
Question No# :
26
out of 50
What is a Python dictionary?
पायथन डिक्शनरी क्या है?
A.
A collection of ordered and mutable data
ऑर्डर्ड और म्युटेबल डेटा का कलेक्शन
B.
A collection of unordered and mutable data with key-value pairs
की-वैल्यू पेयर्स के साथ अनऑर्डर्ड और म्युटेबल डेटा का कलेक्शन
C.
A collection of immutable key-value pairs
म्म्यूटेबल की-वैल्यू पेयर्स का कलेक्शन
D.
A collection of values only
केवल वैल्यूज का कलेक्शन
Question No# :
27
out of 50
Which of the following function returns True if the string is non empty and has all uppercase alphabets.
यदि स्ट्रिंग नॉन-इम्पटी है और सभी अपरकेस अक्षर हैं, तो निम्न में से कौन सा फंक्शन सही है।
A.
islower()
islower()
B.
isupper()
isupper()
C.
Islower()
Islower()
D.
None
कोई नहीं
Question No# :
28
out of 50
Write the list comprehension to pick out only negative integers from a given list ‘l’.
दी गई लिस्ट। L ’से केवल नेगटिव इन्टिजर निकालने के लिए लिस्ट की समझ लिखें।
A.
[x<0 in l]
[x<0 in l]
B.
[x for x<0 in l]
[x for x<0 in l]
C.
[x in l for x<0]
[x in l for x<0]
D.
[x for x in l if x<0]
[x for x in l if x<0]
Question No# :
29
out of 50
If a is a dictionary with some key-value pairs, what does a.popitem() do?
यदि कुछ की-वैल्यू वाले पेअर के साथ एक ड़िक्शनरी है,तो a.popitem () क्या करता है?
A.
Removes an arbitrary element
एक आर्बिट्रेरी एलिमेंट्स रिमूव करता है
B.
Removes all the key-value pairs
सभी की-वैल्यू पेयर्स रिमूव करता है
C.
Removes the key-value pair for the key given as an argument
आर्ग्यमन्ट के रूप में दी गई key के लिए की-वैल्यू पेयर्स को रिमूव करती है
D.
Invalid method for dictionary
ड़िक्शनरी के लिए इनवैलिड मैथड
Question No# :
30
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">mylist=list("a#b#c#d".split('#'))<br></span><span style="font-size: 14px;">print(mylist)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">mylist=list("a#b#c#d".split('#'))<br></span><span style="font-size: 14px;">print(mylist)</span></pre>
A.
[‘a’, ‘b’, ‘c’, ‘d’]
[‘a’, ‘b’, ‘c’, ‘d’]
B.
[‘a b c d’]
[‘a b c d’]
C.
[‘a#b#c#d’]
[‘a#b#c#d’]
D.
[‘abcd’]
[‘abcd’]
Question No# :
31
out of 50
<p>What is the output of the following statement ?</p><pre>print ((2, 4) + (1, 5))</pre>
<p>निम्नलिखित कथन का आउटपुट क्या है?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">print ((2, 4) + (1, 5))</pre>
A.
(2 , 4), (4 , 5)
(2 , 4), (4 , 5)
B.
(3 , 9)
(3 , 9)
C.
(2, 4, 1, 5)
(2, 4, 1, 5)
D.
Invalid Syntax
Invalid Syntax
Question No# :
32
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('a@ 1,'.islower())</span></pre>
<p>निम्नलिखित पायथन कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('a@ 1,'.islower())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
33
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('abcdefcdghcd'.split('cd'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdefcdghcd'.split('cd'))</span></pre>
A.
[‘ab’, ‘ef’, ‘gh’]
[‘ab’, ‘ef’, ‘gh’]
B.
[‘ab’, ‘ef’, ‘gh’, ”]
[‘ab’, ‘ef’, ‘gh’, ”]
C.
(‘ab’, ‘ef’, ‘gh’)
(‘ab’, ‘ef’, ‘gh’)
D.
(‘ab’, ‘ef’, ‘gh’, ”)
(‘ab’, ‘ef’, ‘gh’, ”)
Question No# :
34
out of 50
Which keyword is used to remove individual items or the entire dictionary itself.
अलग-अलग आइटम या पूरी डिक्शनरी को हटाने के लिए किस कीवर्ड का उपयोग किया जाता है।
A.
del
del
B.
remove
remove
C.
removeAll
removeAll
D.
None of these
इनमें से कोई नहीं
Question No# :
35
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('abcdefcdghcd'.split('cd', 0))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdefcdghcd'.split('cd', 0))</span></pre><p><br></p>
A.
[‘abcdefcdghcd’]
[‘abcdefcdghcd’]
B.
‘abcdefcdghcd’
‘abcdefcdghcd’
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
36
out of 50
<p>What will be the output of the following Python code?</p> <pre>a={1:"A",2:"B",3:"C"}<br>print(a.items())</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a={1:"A",2:"B",3:"C"}<br>print(a.items())</pre>
A.
Syntax error
सिंटेक्स एरर
B.
dict_items([(‘A’), (‘B’), (‘C’)])
dict_items([(‘A’), (‘B’), (‘C’)])
C.
dict_items([(1,2,3)])
dict_items([(1,2,3)])
D.
dict_items([(1, ‘A’), (2, ‘B’), (3, ‘C’)])
dict_items([(1, ‘A’), (2, ‘B’), (3, ‘C’)])
Question No# :
37
out of 50
Which of the following function of dictionary gets all the keys from the dictionary
निम्नलिखित में से डिक्शनरी का कौन सा फ़ंक्शन डिक्शनरी से सभी की निकालने के लिए किया जाता है
A.
getkeys()
getkeys()
B.
key()
key()
C.
keys()
keys()
D.
none of the mentioned
none of the mentioned
Question No# :
38
out of 50
<p>What will be the output of the following Python code?</p> <pre>a={'B':5,'A':9,'C':7}<br>print(sorted(a))</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a={'B':5,'A':9,'C':7}<br>print(sorted(a))</pre>
A.
[‘A’,’B’,’C’]
[‘A’,’B’,’C’]
B.
[‘B’,’C’,’A’]
[‘B’,’C’,’A’]
C.
[5,7,9]
[5,7,9]
D.
[9,5,7]
[9,5,7]
Question No# :
39
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('xyyzxxyxyy'.lstrip('xyy'))</span></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('xyyzxxyxyy'.lstrip('xyy'))</span></pre>
A.
error
एरर
B.
zxxyxyy
zxxyxyy
C.
z
z
D.
zxxy
zxxy
Question No# :
40
out of 50
Which statement is correct??
कौन सा कथन सही है??
A.
. List is mutable & Tuple is immutable
. List is mutable & Tuple is immutable
B.
List is immutable & Tuple is mutable
List is immutable & Tuple is mutable
C.
Both are mutable
Both are mutable
D.
Both are immutable
Both are immutable
Question No# :
41
out of 50
Which statement is correct
कौन सा कथन सही है
A.
List is mutable & Tuple is immutable
सूची परिवर्तनशील है और टपल अपरिवर्तनीय है
B.
List is immutable & Tuple is mutable
सूची अपरिवर्तनीय है और टपल परिवर्तनशील है
C.
Both List and Tuple are Mutable
लिस्ट और टपल दोनों परिवर्तनशील हैं
D.
Both List and Tuple are Immutable
सूची और टपल दोनों अपरिवर्तनीय हैं
Question No# :
42
out of 50
Suppose a list with name arr, contains 5 elements. You can get the 2nd element from the list using :
मान लीजिए arr नाम वाली एक सूची में 5 तत्व हैं। आप सूची से दूसरा तत्व प्राप्त कर सकते हैं:
A.
arr[-2]
arr[-2]
B.
arr[2]
arr[2]
C.
arr[-1]
arr[-1]
D.
arr[1]
arr[1]
Question No# :
43
out of 50
Which of the following operations is NOT allowed on a tuple?
टपल पर निम्नलिखित में से किस ऑपरेशन की अनुमति नहीं है?
A.
Slicing
स्लाइसिंग
B.
Concatenation
कंकटेनशन
C.
Deletion of elements
एलिमेंट्स का विलोपन
D.
Iteration
इट्रेशन
Question No# :
44
out of 50
<p>What will be the output of the following code snippet?</p><pre><span style="font-size: 14px;">a=[1,2,3,4,5,6,7,8,9]<br></span><span style="font-size: 14px;">a[::2]=10,20,30,40,50,60<br></span><span style="font-size: 14px;">print(a)</span></pre><div><br></div>
<p>निम्नलिखित कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a=[1,2,3,4,5,6,7,8,9]<br></span><span style="font-size: 14px;">a[::2]=10,20,30,40,50,60<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
ValueError: attempt to assign sequence of size 6 to extended slice of size 5
ValueError: attempt to assign sequence of size 6 to extended slice of size 5
B.
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
[10, 2, 20, 4, 30, 6, 40, 8, 50, 60]
C.
[1, 2, 10, 20, 30, 40, 50, 60]
[1, 2, 10, 20, 30, 40, 50, 60]
D.
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
[1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 60]
Question No# :
45
out of 50
<p>What will be the output of the following Python code?</p><pre>d = {0, 1, 2}<br>for x in d:<br> print(x)</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">d = {0, 1, 2}<br>for x in d:<br> print(x)</pre>
A.
0 1 2
0 1 2
B.
{0, 1, 2} {0, 1, 2} {0, 1, 2}
{0, 1, 2} {0, 1, 2} {0, 1, 2}
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
46
out of 50
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?
मान लीजिए लिस्ट है [3, 4, 5, 20, 5, 25, 1, 3] ,listExample.extend([34, 5]) के बाद की लिस्ट1 क्या है।
A.
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
[3, 4, 5, 20, 5, 25, 1, 3, 34, 5]
B.
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
[1, 3, 3, 4, 5, 5, 20, 25, 34, 5]
C.
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
[25, 20, 5, 5, 4, 3, 3, 1, 34, 5]
D.
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
[1, 3, 4, 5, 20, 5, 25, 3, 34, 5]
Question No# :
47
out of 50
To return the length of string s what command do we execute?
स्ट्रिंग की लेंथ रिटर्न करने के लिए हम किस कमांड को एक्सक्यूट करते हैं?
A.
s.__len__()
s.__len__()
B.
len(s)
len(s)
C.
size(s)
size(s)
D.
s.size()
s.size()
Question No# :
48
out of 50
<p>What will be the output of the following Python code?</p> <pre><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">b=a.copy()<br></font><font color="#333333">b[2]="D" <br></font><font color="#333333">print(a)</font></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><font color="#333333">a={1:"A",2:"B",3:"C"}<br></font><font color="#333333">b=a.copy()<br></font><font color="#333333">b[2]="D" <br></font><font color="#333333">print(a)</font></pre>
A.
Error, copy() method doesn’t exist for dictionaries
एरर, डिक्शनरीज़ के लिए कॉपी () मैथड मौजूद नहीं है
B.
{1: ‘A’, 2: ‘B’, 3: ‘C’}
{1: ‘A’, 2: ‘B’, 3: ‘C’}
C.
{1: ‘A’, 2: ‘D’, 3: ‘C’}
{1: ‘A’, 2: ‘D’, 3: ‘C’}
D.
“None” is printed
"कोई नहीं" प्रिंट है
Question No# :
49
out of 50
<p>What is the output of the following program:</p><pre><span style="font-size: 14px;">print ("Hello World"[::-1])</span></pre>
<p> निम्नलिखित प्रोग्राम का आउटपुट क्या है:</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print ("Hello World"[::-1])</span></pre>
A.
dlroW olleH
dlroW olleH
B.
Hello Worl
Hello Worl
C.
D
D
D.
error
error
Question No# :
50
out of 50
If wd="Hello World" then which of the following statements will display last five characters of the string object?
If wd="Hello World" then which of the following statements will display last five characters of the string object?
A.
wd[4:]
wd[4:]
B.
wd[:4]
wd[:4]
C.
wd[-5:]
wd[-5:]
D.
wd[:-4]
wd[:-4]
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test 2026
Best Computer Training Institute in Prayagraj (Allahabad)
Best Java Training Institute in Prayagraj (Allahabad)
Best Python Training Institute in Prayagraj (Allahabad)
O Level Online Test in Hindi
Best Website and Software Company in Allahabad