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
What is the output of following?
निम्न code का output क्या होगा?
A.
{1:'a', 2:'b'}
{1:'a', 2:'b'}
B.
{2:'b'}
{2:'b'}
C.
{1:'c', 2:'b'}
{1:'c', 2:'b'}
D.
Error
Error
Question No# :
02
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# :
03
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# :
04
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('abcd'.partition('cd'))</span></pre>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcd'.partition('cd'))</span></pre>
A.
(‘ab’, ‘cd’, ”)
(‘ab’, ‘cd’, ”)
B.
(‘ab’, ‘cd’)
(‘ab’, ‘cd’)
C.
error
एरर
D.
none of the mentioned
उल्लेखित कोई नहीं
Question No# :
05
out of 50
Which statement about dictionaries is true?
Dictionaries के बारे में कौन-सा statement TRUE है?
A.
Dictionary keys must be mutable
Dictionary keys must be mutable
B.
Dictionary values must be immutable
Dictionary values must be immutable
C.
Dictionary reserves insertion order only in Python 2
Dictionary reserves insertion order only in Python 2
D.
Dictionary keys must be unique
Dictionary keys must be unique
Question No# :
06
out of 50
<p>What will be the output of the following Python code?</p> <pre>a=dict()<br>print(a[1])</pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">a=dict()<br>print(a[1])</pre>
A.
An exception is thrown since the dictionary is empty
डिक्शनरी खाली होने के बाद एक एक्सेप्शन रखा गया है
B.
‘ ‘
‘ ‘
C.
1
1
D.
0
0
Question No# :
07
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', -1))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdefcdghcd'.split('cd', -1))</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# :
08
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(x)</pre><div><br></div>
<p>निम्नलिखित पायथन कोड का आउटपुट क्या होगा?</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(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# :
09
out of 50
<p>What will be the output of the following Python code snippet?</p><pre><span style="font-size: 14px;">print('cd'.partition('cd'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('cd'.partition('cd'))</span></pre>
A.
(‘cd’)
(‘cd’)
B.
(”)
(”)
C.
(‘cd’, ”, ”)
(‘cd’, ”, ”)
D.
(”, ‘cd’, ”)
(”, ‘cd’, ”)
Question No# :
10
out of 50
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is the value of list1.count(5)?
मान लीजिए list1 [3, 4, 5, 20, 5, 25, 1, 3], है, list1.count(5) की क्या वैल्यू है।
A.
0
0
B.
4
4
C.
1
1
D.
2
2
Question No# :
11
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# :
12
out of 50
What does the function re-search do?
फंक्शन re-search क्या करता है?
A.
matches a pattern at the start of the string.
स्ट्रिंग की शुरुआत में एक पैटर्न से मेल खाता है
B.
matches a pattern at any position in the string.
स्ट्रिंग में किसी भी स्थिति में एक पैटर्न से मेल खाता है
C.
such a function does not exist
ऐसा कोई फंक्शन मौजूद नहीं है
D.
none of the mentioned.
उल्लिखित कोई नहीं ।
Question No# :
13
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={4:"D",5:"E"}<br></font><font color="#333333">a.update(b) <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={4:"D",5:"E"}<br></font><font color="#333333">a.update(b) <br></font><font color="#333333">print(a)</font></pre>
A.
{1: ‘A’, 2: ‘B’, 3: ‘C’}
{1: ‘A’, 2: ‘B’, 3: ‘C’}
B.
Method update() doesn’t exist for dictionaries
मैथड अपडेट () ड़िक्शनरी के लिए मौजूद नहीं है
C.
{1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
{1: 'A', 2: 'B', 3: 'C', 4: 'D', 5: 'E'}
D.
{4: ‘D’, 5: ‘E’}
{4: ‘D’, 5: ‘E’}
Question No# :
14
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">a={5,6,7,8}<br></span><span style="font-size: 14px;">b={7,8,9,10} <br></span><span style="font-size: 14px;">print(len(a+b))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a={5,6,7,8}<br></span><span style="font-size: 14px;">b={7,8,9,10} <br></span><span style="font-size: 14px;">print(len(a+b))</span></pre>
A.
8
8
B.
Error, unsupported operand ‘+’ for sets
Error, unsupported operand ‘+’ for sets
C.
6
6
D.
Nothing is displayed
कुछ भी डिस्प्लेड नहीं है
Question No# :
15
out of 50
To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?
स्ट्रिंग 3 = "हैलो" से इंडेक्स 3 पर character को रिट्रीव करने के लिए हम किस कमांड को एक्सक्यूट करते हैं (multiple answers allowed)?
A.
s[]
s[]
B.
s.getitem(3)
s.getitem(3)
C.
s.__getitem__(3)
s.__getitem__(3)
D.
s.getItem(3)
s.getItem(3)
Question No# :
16
out of 50
<p>What will be printed?</p><pre><span style="font-size: 14px;">a = [[1, 2], [3, 4]]<br></span><span style="font-size: 14px;">print(a[1][0])</span></pre>
<p> इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a = [[1, 2], [3, 4]]<br></span><span style="font-size: 14px;">print(a[1][0])</span></pre>
A.
1
1
B.
2
2
C.
3
3
D.
4
4
Question No# :
17
out of 50
Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?
मान लीजिए कि d = {"जॉन": 40, "पीटर": 45}, "जॉन" के लिए एंट्री डिलीट करने के लिए,हम किस कमांड का यूज़ करते हैं?
A.
d.delete(“john”:40)
d.delete ( "जॉन": 40)
B.
d.delete(“john”)
d.delete ( "जॉन")
C.
del d[“john”]
डेल डी ["जॉन"]
D.
del d(“john”:40)
डेल डी ("जॉन": 40)
Question No# :
18
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# :
19
out of 50
<p>What will be the output?</p><pre><span style="font-size: 14px;">t = (1, 2, 3)<br></span><span style="font-size: 14px;">t[1] = 5<br></span><span style="font-size: 14px;">print(t)</span></pre>
<p>इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">t = (1, 2, 3)<br></span><span style="font-size: 14px;">t[1] = 5<br></span><span style="font-size: 14px;">print(t)</span></pre>
A.
(1, 5, 3)
(1, 5, 3)
B.
Error
Error
C.
(1, 2, 3)
(1, 2, 3)
D.
None
None
Question No# :
20
out of 50
To remove string “hello” from list1, we use which command?
लिस्ट1 से स्ट्रिंग "हैलो" को रिमूव करने के लिए, हम किस कमांड का यूज़ करते हैं?
A.
list1.remove(“hello”)
लिस्ट1.रिमूव("हैलो")
B.
list1.remove(hello)
लिस्ट1.रिमूव(हैलो)
C.
list1.removeAll(“hello”)
लिस्ट1.रिमूव ऑल("हैलो")
D.
list1.removeOne(“hello”)
लिस्ट1.रिमूववन("हैलो")
Question No# :
21
out of 50
<p>What will be the output of the following Python code? </p><pre>example = "NITIN" print(example.rfind("N"))</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">example = "NITIN" print(example.rfind("N"))</pre>
A.
-1
-1
B.
4
4
C.
3
3
D.
1
1
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('Hello!2@#World'.istitle())</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('Hello!2@#World'.istitle())</span></pre>
A.
True
सही
B.
False
गलत
C.
None
कोई नहीं
D.
error
एरर
Question No# :
23
out of 50
Which of the following isn’t true about dictionary keys?
निम्नलिखित में से कौन ड़िक्शनरी keys के बारे में सही नहीं है?
A.
More than one key isn’t allowed
एक से अधिक key की अनुमति नहीं है
B.
Keys must be immutable
keys इम्यूटबल होनी चाहिए
C.
Keys must be integers
keys इन्टिजर होनी चाहिए
D.
When duplicate keys encountered, the last assignment wins
जब डुप्लिकेट keys का सामना करना पड़ा, तो लास्ट असाइनमेंट जीत गया
Question No# :
24
out of 50
Which of the following is a mapping datatype?
निम्न में से कौन एक मैपिंग डेटाटाइप है?
A.
String
स्ट्रिंग
B.
List
लिस्ट
C.
Tuple
टपल
D.
Dictionary
डिक्शनरी
Question No# :
25
out of 50
<p style="letter-spacing: 0.14px;">What is the output of following code</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = [1, 2, 3]<br></span><span style="font-size: 14px;">print(x[1:10])</span></pre>
<p>निम्नलिखित कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">x = [1, 2, 3]<br></span><span style="font-size: 14px;">print(x[1:10])</span></pre>
A.
Error
Error
B.
[2, 3]
[2, 3]
C.
[1, 2, 3]
[1, 2, 3]
D.
[]
[]
Question No# :
26
out of 50
Which one of the following is inmmutable data type?
Which one of the following is inmmutable data type?
A.
list
लिस्ट
B.
set
सेट
C.
tuple
tuple
D.
dict
dict
Question No# :
27
out of 50
<p>What will be the output of the following Python code snippet?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""> <span style="font-size: 12.6px;">a = {} a[1] = 1 a['1'] = 2 a[1.0]=4 count = 0 for i in a: count += a[i] print(count) print(a)</span></pre>
<p>निम्नलिखित Ptyhon कोड स्निपेट का आउटपुट क्या होगा?</p><pre class="de1" lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"="" style="font-size: 12.6px; letter-spacing: 0.14px; border-radius: 0px; padding: 0px;"> a = {} a[1] = 1 a['1'] = 2 a[1.0]=4 count = 0 for i in a: count += a[i] print(count) print(a)</pre>
A.
An exception is thrown
एक एक्सेप्शन फेंक दिया जाता है
B.
3
3
C.
6
6
D.
2
2
Question No# :
28
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# :
29
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# :
30
out of 50
<p>What will be the output of the following Python code?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""> <span style="font-size: 12.6px;">word1="Apple" word2="Apple" list1=[1,2,3] list2=[1,2,3] print(word1 is word2) print(list1 is list2)</span></pre><div><br></div>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre class="de1" lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"="" style="font-size: 12.6px; letter-spacing: 0.14px; border-radius: 0px; padding: 0px;"> word1="Apple" word2="Apple" list1=[1,2,3] list2=[1,2,3] print(word1 is word2) print(list1 is list2)</pre>
A.
True True
सही सही
B.
False True
गलत सही
C.
False False
गलत गलत
D.
True False
सही गलत
Question No# :
31
out of 50
Suppose t = (1, 2, 4, 3), which of the following is incorrect?
मान लीजिए t = (1, 2, 4, 3), निम्न में से कौन गलत है?
A.
print(t[3])
print(t[3])
B.
t[3] = 45
t[3] = 45
C.
print(max(t))
print(max(t))
D.
print(len(t))
print(len(t))
Question No# :
32
out of 50
<p>What will be the output?</p><pre><span style="font-size: 14px;">a, b, c = (10, 20, 30)<br></span><span style="font-size: 14px;">print(b)</span></pre>
<p>इसका परिणाम क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a, b, c = (10, 20, 30)<br></span><span style="font-size: 14px;">print(b)</span></pre>
A.
10
10
B.
20
20
C.
30
30
D.
Error
Error
Question No# :
33
out of 50
<p>What will be the output of the following code?</p><pre><span style="font-size: 14px;">a=((0,2,3,4)[1:-2])<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=((0,2,3,4)[1:-2])<br></span><span style="font-size: 14px;">print(a)</span></pre>
A.
(3,)
(3,)
B.
(2, )
(2, )
C.
(1,)
(1,)
D.
(0,)
(0,)
Question No# :
34
out of 50
What type of data is: a=[(1,1),(2,4),(3,9)]?
किस प्रकार का डेटा है: a = [(1,1), (2,4), (3,9)]?
A.
Array of tuples
Tuples का ऐरे
B.
List of tuples
Tuples की लिस्ट
C.
Tuples of lists
लिस्ट्स के Tuples
D.
Invalid type
इनवैलिड टाइप
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('abef'.partition('cd'))</span></pre>
<p>निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abef'.partition('cd'))</span></pre>
A.
(‘abef’)
(‘abef’)
B.
(‘abef’, ‘cd’, ”)
(‘abef’, ‘cd’, ”)
C.
(‘abef’, ”, ”)
(‘abef’, ”, ”)
D.
error
एरर
Question No# :
36
out of 50
split( ) function returns the _____ of words delimited by the specified substring.
स्प्लिट() फंक्शन निर्दिष्ट सबस्ट्रिंग द्वारा सीमांकित शब्दों का ____ देता है।
A.
List
लिस्ट
B.
Tuple
टपल
C.
Dictionary
डिक्शनरी
D.
None
कोई नहीं
Question No# :
37
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(list(d.keys()))</span></pre>
<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(list(d.keys()))</span></pre>
A.
[“john”, “peter”]
[“john”, “peter”]
B.
[“john”:40, “peter”:45]
[“john”:40, “peter”:45]
C.
(“john”, “peter”)
(“john”, “peter”)
D.
(“john”:40, “peter”:45)
(“john”:40, “peter”:45)
Question No# :
38
out of 50
<p>What will be the output of the following Python code?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""><span style="font-size: 12.6px;">a={} a[2]=1 a[1]=[2,3,4] print(a[1][1])</span><br></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre class="de1" lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"="" style="font-size: 12.6px; letter-spacing: 0.14px; border-radius: 0px; padding: 0px;">a={} a[2]=1 a[1]=[2,3,4] print(a[1][1])</pre>
A.
[2,3,4]
[2,3,4]
B.
3
3
C.
2
2
D.
An exception is thrown
एक एक्सेप्शन फेंक दिया जाता है
Question No# :
39
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# :
40
out of 50
Which of the following commands will create a list?
निम्नलिखित में से कौन सी कमांड एक लिस्ट क्रिएट करेगी ?
A.
list1 = list()
list1 = list()
B.
list1 = []
list1 = []
C.
list1 = list([1, 2, 3])
list1 = list([1, 2, 3])
D.
all of the mentioned
सभी का उल्लेख है
Question No# :
41
out of 50
Which of the following data types is immutable?
निम्न में से कौन-सा data type immutable है?
A.
List
List
B.
Dictionary
Dictionary
C.
Set
Set
D.
Tuple
Tuple
Question No# :
42
out of 50
Each individual character in a string can be accessed using a technique called _____ .
एक स्ट्रिंग में प्रत्येक इनडिविजुअल कैरेक्टर को ____ ...नामक तकनीक का उपयोग करके एक्सेस किया जा सकता है
A.
indexing
इन्डेक्सिंग
B.
Replication
रेप्लिकेशन
C.
concatenation
कॉन्केटनेशन
D.
None of the Above
उपर्युक्त में से कोई नहीं
Question No# :
43
out of 50
<p>What will be the output of the following Python code?</p><pre><span style="font-size: 14px;">print('abcdef'.partition('cd'))</span></pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">print('abcdef'.partition('cd'))</span></pre>
A.
(‘ab’, ‘ef’)
(‘ab’, ‘ef’)
B.
(‘abef’)
(‘abef’)
C.
(‘ab’, ‘cd’, ‘ef’)
(‘ab’, ‘cd’, ‘ef’)
D.
2
2
Question No# :
44
out of 50
<p>What will be the output of the following Python code?</p><pre>myList = [1, 5, 5, 5, 5, 1]<br>max = myList[0]<br>indexOfMax = 0<br>for i in range(1, len(myList)):<br> if myList[i] > max:<br> max = myList[i]<br> indexOfMax = i <br>print(indexOfMax)</pre>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;">myList = [1, 5, 5, 5, 5, 1]<br>max = myList[0]<br>indexOfMax = 0<br>for i in range(1, len(myList)):<br> if myList[i] > max:<br> max = myList[i]<br> indexOfMax = i <br>print(indexOfMax)</pre>
A.
1
1
B.
2
2
C.
3
3
D.
4
4
Question No# :
45
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# :
46
out of 50
Which data type is immutable?
कौन सा डेटा प्रकार अपरिवर्तनीय है?
A.
Dictionary
Dictionary
B.
Tuple
Tuple
C.
Set
Set
D.
List
List
Question No# :
47
out of 50
<p>What will be the output of the following Python code?</p> <pre class="de1" style="border-radius: 0px; padding: 0px; font-family: Consolas, Monaco, " lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"=""><span style="font-size: 12.6px;">a=[13,56,17] a.append([87]) a.extend([45,67]) print(a)</span><br></pre><p style="border-radius: 0px; padding: 0px;"><br></p>
<p>निम्नलिखित Python कोड का आउटपुट क्या होगा?</p><pre class="de1" lucida="" console",="" monospace;="" color:="" rgb(51,="" 51,="" 51);="" word-break:="" break-all;="" overflow-wrap:="" normal;="" background:="" rgb(244,="" 244,="" 244);="" border:="" 0px;="" overflow:="" visible;="" box-shadow:="" none;="" text-align:="" justify;="" margin-top:="" 0px="" !important;="" margin-bottom:="" line-height:="" 20px="" !important;"="" style="font-size: 12.6px; letter-spacing: 0.14px; border-radius: 0px; padding: 0px;">a=[13,56,17] a.append([87]) a.extend([45,67]) print(a)</pre>
A.
[13, 56, 17, [87], 45, 67]
[13, 56, 17, [87], 45, 67]
B.
[13, 56, 17, 87, 45, 67]
[13, 56, 17, 87, 45, 67]
C.
[13, 56, 17, 87,[ 45, 67]]
[13, 56, 17, 87,[ 45, 67]]
D.
[13, 56, 17, [87], [45, 67]]
[13, 56, 17, [87], [45, 67]]
Question No# :
48
out of 50
<p>What will be the output of the following expression?</p><pre><span style="font-size: 14px;">a = 2<br></span><span style="font-size: 14px;">b = 8<br></span><span style="font-size: 14px;">print(a|b )<br></span><span style="font-size: 14px;">print(a >> 1)</span></pre>
<p>निम्नलिखित अभिव्यक्ति का आउटपुट क्या होगा?</p><pre style="font-size: 12.6px; letter-spacing: 0.14px;"><span style="font-size: 14px;">a = 2<br></span><span style="font-size: 14px;">b = 8<br></span><span style="font-size: 14px;">print(a|b )<br></span><span style="font-size: 14px;">print(a >> 1)</span></pre>
A.
10 0
10 0
B.
10 2
10 2
C.
2 2
2 2
D.
10 1
10 1
Question No# :
49
out of 50
"hello,world".[-6], what value print?
"hello,world".[-6], का आउटपुट क्या होगा?
A.
White Space
White Space
B.
,
,
C.
e
e
D.
S
S
Question No# :
50
out of 50
In which of the following data type, duplicate items are not allowed ?
निम्नलिखित में से किस डेटा प्रकार में डुप्लीकेट आइटम की अनुमति नहीं है?
A.
List
List
B.
Dictionary
Dictionary
C.
Set
Set
D.
None of the Above
None of the Above
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