O Level Online Exam
Menu mobile
Home
MCQ Topic Wise
INFORMATION TECHNOLOGY TOOLS AND NETWORK BASICS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Online Mock Test
INFORMATION TECHNOLOGY TOOLS AND NETWORK BASICS
New
WEB DESIGNING AND PUBLISHING
New
PROGRAMMING AND PROBLEM SOLVING THROUGH PYTHON
New
INTERNET OF THINGS AND ITS APPLICATIONS
New
Old Papers
Practical Questions
Videos
Projects
MCQ : SEQUENCE DATA TYPES IN PYTHON For NIELIT O Level Exam
SEQUENCE DATA TYPES IN PYTHON For NIELIT O Level Exam
00:00:00
English
Hindi
Question No# :
01
out of 50
Report Bug
Bookmark
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# :
02
out of 50
Report Bug
Bookmark
What does the strip() method do in Python?
पायथन में स्ट्रिप() विधि क्या करती है?
A.
Removes all spaces from the string.
स्ट्रिंग से सभी स्पेसेस को रिमूव कर देती है.
B.
Removes the first and last character of the string.
स्ट्रिंग का फर्स्ट और लास्ट कैरेक्टर को रिमूव कर देता है।
C.
Removes whitespace from the beginning and end of the string.
स्ट्रिंग के बिगनिंग और एन्ड से वाइटस्पेस को रिमूव करता है।
D.
Converts the string into a list of characters.
स्ट्रिंग को कैरेक्टर्स की लिस्ट में कन्वर्ट करता है।
Question No# :
03
out of 50
Report Bug
Bookmark
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# :
04
out of 50
Report Bug
Bookmark
Which of the following is a valid way to create an empty tuple?
निम्नलिखित में से कौन सा एक एम्प्टी टपल क्रिएट करने का वैध तरीका है?
A.
empty_tuple = ()
empty_tuple = ()
B.
empty_tuple = tuple()
empty_tuple = tuple()
C.
empty_tuple = []
empty_tuple = []
D.
Both A and B
ए और बी दोनों
Question No# :
05
out of 50
Report Bug
Bookmark
To add a new element to a list we use which Python command?
लिस्ट में एक नया आइटम जोड़ने के लिए हम किस पायथन कमांड का उपयोग करते हैं?
A.
list1.addEnd (5)
list1.addEnd (5)
B.
list1.addLast (5)
list1.addLast (5)
C.
list1.append (5)
list1.append (5)
D.
list1.add(5)
list1.add(5)
Question No# :
06
out of 50
Report Bug
Bookmark
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
मान लीजिए लिस्ट [3, 4, 5, 20, 5, 25, 1, 3], है, listExample.pop(1) के बाद की लिस्ट1 क्या है।
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# :
07
out of 50
Report Bug
Bookmark
Which of the following functions will return the symmetric difference between two sets, x and y?
निम्नलिखित में से कौन सा कार्य दो सेटों, x और y के बीच सिमेट्रिक डिफ्रेंस को रिटर्न करेगा ?
A.
x | y
x | y
B.
x ^ y
x ^ y
C.
x & y
x & y
D.
x – y
x – y
Question No# :
08
out of 50
Report Bug
Bookmark
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]
Question No# :
09
out of 50
Report Bug
Bookmark
split( ) function returns the _____ of words delimited by the specified substring.
स्प्लिट() फंक्शन निर्दिष्ट सबस्ट्रिंग द्वारा सीमांकित शब्दों का ____ देता है।
A.
List
लिस्ट
B.
Tuple
टपल
C.
Dictionary
डिक्शनरी
D.
None
कोई नहीं
Question No# :
10
out of 50
Report Bug
Bookmark
Which of the following statements given below is/are true?
नीचे दिए गए कथनों में से कौन सा/से सत्य है/हैं?
A.
Tuples have structure; lists have an order
Tuples have structure; lists have an order
B.
Tuples are homogeneous, lists are heterogeneous.
Tuples are homogeneous, lists are heterogeneous.
C.
Tuples are immutable, lists are mutable.
Tuples are immutable, lists are mutable.
D.
All of them
All of them
Question No# :
11
out of 50
Report Bug
Bookmark
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# :
12
out of 50
Report Bug
Bookmark
Which of the following are valid string manipulation functions in python?
निम्नलिखित में से कौन से पायथन में वैध स्ट्रिंग मैनिपुलेशन फ़ंक्शन हैं?
A.
count()
count()
B.
upper()
upper()
C.
strip()
strip()
D.
All the above
ऊपर के सभी
Question No# :
13
out of 50
Report Bug
Bookmark
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# :
14
out of 50
Report Bug
Bookmark
Suppose list1 is [2445,133,12454,123], what is max(list1)?
मान लीजिए कि लिस्ट 1 है [2445,133,12454,123],Max (लिस्ट1) क्या है?
A.
2445
2445
B.
133
133
C.
12454
12454
D.
123
123
Question No# :
15
out of 50
Report Bug
Bookmark
Which of the following methods is used to check if a string starts with a specific prefix?
निम्नलिखित में से किस मेथड का यूज़ यह चेक करने के लिए किया जाता है कि कोई स्ट्रिंग किसी स्पेसिफ़िक प्रीफ़िक्स से स्टार्ट होती है या नहीं?
A.
startswith()
startswith()
B.
startswith_prefix()
startswith_prefix()
C.
startswithwith()
startswithwith()
D.
startswiths()
startswiths()
Question No# :
16
out of 50
Report Bug
Bookmark
What is “Hello”.replace(“l”, “e”)?
"हैलो" .replace ("l", "e") क्या है?
A.
Heeeo
Heeeo
B.
Heelo
Heelo
C.
Heleo
Heleo
D.
None
कोई नहीं
Question No# :
17
out of 50
Report Bug
Bookmark
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# :
18
out of 50
Report Bug
Bookmark
Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
मान लीजिए कि list1 = [0.5 * x for x in range(0, 4)], list1 है:
A.
[0, 1, 2, 3]
[0, 1, 2, 3]
B.
[0, 1, 2, 3, 4]
[0, 1, 2, 3, 4]
C.
[0.0, 0.5, 1.0, 1.5]
[0.0, 0.5, 1.0, 1.5]
D.
[0.0, 0.5, 1.0, 1.5, 2.0]
[0.0, 0.5, 1.0, 1.5, 2.0]
Question No# :
19
out of 50
Report Bug
Bookmark
Given a string s="Welcome", which of the following code is incorrect ?
एक स्ट्रिंग s="Welcome" में निम्नलिखित में से कौन सा कोड गलत है?
A.
print s[0]
print s[0]
B.
print s.lower()
print s.lower()
C.
s[1]='r'
s[1]='r'
D.
print s.strip()
print s.strip()
Question No# :
20
out of 50
Report Bug
Bookmark
The ____________ function removes the first element of a set and the last element of a list.
____________ फ़ंक्शन सेट का फर्स्ट एलिमेंट् और किसी लिस्ट का लास्ट एलिमेंट निकालता है।
A.
remove
रिमूव
B.
pop
पॉप
C.
discard
डिस्कार्ड
D.
dispose
डिस्पोज़
Question No# :
21
out of 50
Report Bug
Bookmark
Which method is used to access some part of a string or substring.
स्ट्रिंग या सबस्ट्रिंग के कुछ भाग को एक्सेस करने के लिए किस विधि का उपयोग किया जाता है।
A.
slicer
स्लाईसर
B.
Slicing
स्लाईसिंग
C.
Membership
मेंबरशिप
D.
None of these-
इनमें से कोई नहीं
Question No# :
22
out of 50
Report Bug
Bookmark
Which of the following statements is used to create an empty set?
एम्प्टी सेट क्रिएट करने के लिए निम्नलिखित में से किस स्टेट्मेंट का यूज़ किया जाता है?
A.
{ }
{ }
B.
set()
set()
C.
[ ]
[ ]
D.
( )
( )
Question No# :
23
out of 50
Report Bug
Bookmark
Set makes use of __________ Dictionary makes use of ____________
सेट __________ का यूज़ करता है शब्दकोश ____________ का यूज़ करता है
A.
keys, keys
keys, keys
B.
key values, keys
key values, keys
C.
keys, key values
keys, key values
D.
key values, key values
key values, key values
Question No# :
24
out of 50
Report Bug
Bookmark
What is the output of >>>’2’ +’3’
>>>'2' +'3' का आउटपुट क्या है
A.
23
23
B.
'2+3'
'2+3'
C.
'23'
'23'
D.
None of These
None of These
Question No# :
25
out of 50
Report Bug
Bookmark
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# :
26
out of 50
Report Bug
Bookmark
What is the data type of (1)?
(1) का डेटा प्रकार क्या है?
A.
Tuple
टपल
B.
Integer
इन्टिजर
C.
List
लिस्ट
D.
Both tuple and integer
टपल और इन्टिजर दोनों
Question No# :
27
out of 50
Report Bug
Bookmark
What is the output of the following program ? print "Hello World".[::-1]
निम्नलिखित प्रोग्राम का आउटपुट क्या है? print "Hello World".[::-1]
A.
dlroWolleH
dlroWolleH
B.
Hello Worl
Hello Worl
C.
d
d
D.
Error
Error
Question No# :
28
out of 50
Report Bug
Bookmark
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# :
29
out of 50
Report Bug
Bookmark
Which of the following is a mapping datatype?
निम्न में से कौन एक मैपिंग डेटाटाइप है?
A.
String
स्ट्रिंग
B.
List
लिस्ट
C.
Tuple
टपल
D.
Dictionary
डिक्शनरी
Question No# :
30
out of 50
Report Bug
Bookmark
What is the output when we execute list("hello")?
जब हम list ( "hello") निष्पादित करते हैं तो आउटपुट क्या है?
A.
['llo']
['llo']
B.
['hello']
['hello']
C.
['h', 'e', l', 'l', 'o']
['h', 'e', 'l', 'l', 'o']
D.
None of the above
इनमें से कोई नहीं
Question No# :
31
out of 50
Report Bug
Bookmark
Which method is used to add an element to the end of a list?
किसी लिस्ट के एन्ड में कोई एलिमेंट्स जोड़ने के लिए किस मेथड का यूज़ किया जा
A.
insert()
insert()
B.
append()
append()
C.
extend()
extend()
D.
add()
add()
Question No# :
32
out of 50
Report Bug
Bookmark
The data structure which is a mutable ordered sequence of elements is called
डेटा संरचना जो तत्वों का एक परिवर्तनशील क्रमबद्ध अनुक्रम है, कहलाती है
A.
Built in
Built in
B.
List
List
C.
Tuple
Tuple
D.
Derived data
Derived data
Question No# :
33
out of 50
Report Bug
Bookmark
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# :
34
out of 50
Report Bug
Bookmark
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?
मान लीजिए कि लिस्ट1 है [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# :
35
out of 50
Report Bug
Bookmark
Which of the following Statement will create a Tuple:
निम्नलिखित में से कौन सा स्टेट्मेंट एक टपल क्रिएट करेगा:
A.
t1=1,2,4
t1=1,2,4
B.
t1=(1,)
t1=(1,)
C.
t1=tuple(“123”)
t1=tuple(“123”)
D.
All of these
ये सब
Question No# :
36
out of 50
Report Bug
Bookmark
Which function is used to add an element (5) in the list1?
लिस्ट 1 में एक एलिमेंट (5 ) जोड़ने के लिए किस फंक्शन का प्रयोग किया जाता है ?
A.
list1.sum(5)
list1.sum(5)
B.
list1.add(5)
list1.add(5)
C.
listl.append(5)
listl.append(5)
D.
list1.addelement(5)
list1.addelement(5)
Question No# :
37
out of 50
Report Bug
Bookmark
Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)?
मान लीजिए कि list1 [3, 4, 5, 20, 5] है, list1.index (5) क्या है?
A.
0
0
B.
1
1
C.
4
4
D.
2
2
Question No# :
38
out of 50
Report Bug
Bookmark
How can we create an empty list in Python ?
हम पायथन में एक खाली लिस्ट कैसे बना सकते हैं?
A.
list=()
list=()
B.
list.null
list.null
C.
null.list
null.list
D.
list=[]
list=[]
Question No# :
39
out of 50
Report Bug
Bookmark
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# :
40
out of 50
Report Bug
Bookmark
Which one of the following is inmmutable data type?
A.
list
लिस्ट
B.
set
सेट
C.
tuple
tuple
D.
dict
dict
Question No# :
41
out of 50
Report Bug
Bookmark
Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?
मान लीजिए d= {"जॉन": 40, "पीटर": 45}। ड़िक्शनरी में एंट्रीज के नंबर्स प्राप्त करने के लिए हम किस कमांड का यूज़ करते हैं?
A.
d.size()
d.साइज़()
B.
len(d)
लेन (d)
C.
size(d)
साइज़(d)
D.
d.len()
d.लेन()
Question No# :
42
out of 50
Report Bug
Bookmark
What does the update() method do in a dictionary?
अपडेट() मेथड किसी ड़िक्शनरी में क्या करती है?
A.
Clears all key-value pairs
सभी की-वैल्यू पेयर्स क्लियर करता है
B.
Updates a specific key
किसी स्पेसिफ़िक कीज़ को अपडेट्स करता है
C.
Merges another dictionary into the current one
किसी अन्य ड़िक्शनरी को प्रेजेंट ड़िक्शनरी में मर्ज कर देता है
D.
Removes all values
सभी वैल्यूज रिमूव कर देता है
Question No# :
43
out of 50
Report Bug
Bookmark
Which of the statements about dictionary values if false?
ड़िक्शनरी वैल्यूज में से कौन सा स्टेट्मेंट यदि गलत है?
A.
More than one key can have the same value
एक से अधिक key की वैल्यू समान हो सकती है
B.
The values of the dictionary can be accessed as dict[key]
ड़िक्शनरी के वैल्यूज को एक्सेस्सड के रूप में देखा जा सकता है [key]
C.
Values of a dictionary must be unique
एक ड़िक्शनरी की वैल्यूज यूनिक होनी चाहिए
D.
Values of a dictionary can be a mixture of letters and numbers
एक ड़िक्शनरी की वैल्यूज लेटर्स और नंबर्स का मिक्चर हो सकता है
Question No# :
44
out of 50
Report Bug
Bookmark
Suppose i is 5 and j is 4, i + j is same as ________
मान लीजिए कि i 5 है और j 4 है, i + j ________ के समान है
A.
i.__add(j)
i.__add(j)
B.
i.__add__(j)
i.__add__(j)
C.
i.__Add(j)
i.__Add(j)
D.
i.__ADD(j)
i.__ADD(j)
Question No# :
45
out of 50
Report Bug
Bookmark
What will happen if you try to access a key that doesn’t exist in a dictionary?
यदि आप किसी ऐसी की तक पहुंचने का प्रयास करते हैं जो ड़िक्शनरी में मौजूद नहीं है तो क्या होगा?
A.
Returns None
Returns None
B.
Throws a KeyError
Throws a KeyError
C.
Creates a new key with a default value
Creates a new key with a default value
D.
Crashes the program
प्रोग्राम को क्रैश कर देता है
Question No# :
46
out of 50
Report Bug
Bookmark
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# :
47
out of 50
Report Bug
Bookmark
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# :
48
out of 50
Report Bug
Bookmark
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# :
49
out of 50
Report Bug
Bookmark
Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?
मान लीजिए कि लिस्ट-एग्जाम्पल [‘h’,, e ’,, l’,, l ’,’ o ’] है, तो len (listExample) क्या है?
A.
5
5
B.
4
4
C.
None
कोई नहीं
D.
Error
एरर
Question No# :
50
out of 50
Report Bug
Bookmark
Which predefined Python function is used to find length of String()
किस पूर्वनिर्धारित पायथन फंक्शन का उपयोग लंबाई को फाइन्ड के लिए किया जाता है।
A.
length
length
B.
length()
length()
C.
len()
len()
D.
None
कोई नहीं
Latest Current Affairs 2026
Online Exam Quiz for One day Exam
Online Typing Test
CCC Online Test
Python Programming Tutorials
Best Computer Training Institute in Prayagraj (Allahabad)
Online MBA 2 years
Online MCA
Online BCA
Best Website and Software Company in Allahabad