O Level Exam : Student Portal
Email address
Password
Remember me
Forgot password?
Sign In
Google
Facebook
Don't have an account?
Register now
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
Which predefined Python function is used to find length of String()
किस पूर्वनिर्धारित पायथन फंक्शन का उपयोग लंबाई को फाइन्ड के लिए किया जाता है।
A.
length
length
B.
length()
length()
C.
len()
len()
D.
None
कोई नहीं
Question No# :
02
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# :
03
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# :
04
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# :
05
out of 50
Report Bug
Bookmark
Which of the following is true about Python strings?
पायथन स्ट्रिंग्स के बारे में निम्नलिखित में से कौन सा सत्य है?
A.
Strings can be modified using indexing.
इंडेक्सिंग का यूज़ करके स्ट्रिंग्स को मॉडिफाइड किया जा सकता है।
B.
Strings are immutable.
स्ट्रिंग्स इम्म्यूटेबल हैं.
C.
Strings can only contain alphabetic characters.
स्ट्रिंग्स में केवल अल्फ़ाबेट कैरेक्टर्स हो सकते हैं।
D.
Strings must end with a newline character.
स्ट्रिंग्स को एक न्यूलाइन कैरेक्टर के साथ एन्ड होना चाहिए।
Question No# :
06
out of 50
Report Bug
Bookmark
Which of the following functions cannot be used on heterogeneous sets?
निम्न में से किस फ़ंक्शन का यूज़ हेटरजीन्यस सेटों पर नहीं किया जा सकता है?
A.
pop
पॉप
B.
remove
रिमूव
C.
update
अपडेट
D.
sum
सम
Question No# :
07
out of 50
Report Bug
Bookmark
"hello,world".[-6], what value print?
"hello,world".[-6], का आउटपुट क्या होगा?
A.
White Space
White Space
B.
,
,
C.
e
e
D.
S
S
Question No# :
08
out of 50
Report Bug
Bookmark
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# :
09
out of 50
Report Bug
Bookmark
To shuffle the list(say list1) what function do we use?
लिस्ट में शफल (फेरबदल) करने के लिए (say list1) हम किस फ़ंक्शन का यूज़ करते हैं?
A.
list1.shuffle()
list1.shuffle()
B.
shuffle(list1)
shuffle(list1)
C.
random.shuffle(list1)
random.shuffle(list1)
D.
random.shuffleList(list1)
random.shuffleList(list1)
Question No# :
10
out of 50
Report Bug
Bookmark
Which of the following lines of code will result in an error?
कोड की निम्नलिखित लाइन्स में से कौन सा एरर होगा ?
A.
s={abs}
s={abs}
B.
s={4, ‘abc’, (1,2)}
s={4, ‘abc’, (1,2)}
C.
s={2, 2.2, 3, ‘xyz’}
s={2, 2.2, 3, ‘xyz’}
D.
s={san}
s={san}
Question No# :
11
out of 50
Report Bug
Bookmark
Which of these about a dictionary is false?
एक ड़िक्शनरी के बारे में इनमें से कौन गलत है?
A.
The values of a dictionary can be accessed using keys
एक ड़िक्शनरी के वैल्यूज की key का यूज़ करके पहुँचा जा सकता है
B.
The keys of a dictionary can be accessed using values
वैल्यूज का यूज़ करके एक ड़िक्शनरी की key तक पहुँचा जा सकता है
C.
Dictionaries aren’t ordered
डिक्शनरीज़ का ऑर्डर्ड नहीं दिया गया है
D.
Dictionaries are mutable
डिक्शनरीज़ परस्पर हैं
Question No# :
12
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# :
13
out of 50
Report Bug
Bookmark
Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a value using the expression d[“susan”]?
मान लीजिए कि d = {"जॉन": 40, "पीटर": 45}, तब क्या होता है जब हम एक्सप्रेशन का यूज़ करते हुए value प्राप्त करने का प्रयास करते हैं d[“susan”]?
A.
Since “susan” is not a value in the set, Python raises a KeyError exception
चूँकि "सुसान" सेट में कोई वैल्यू नहीं है,Python एक की एरर एक्सेप्शन्स को उठाता है
B.
It is executed fine and no exception is raised, and it returns None
इसे एक्सक्यूट किया जाता है और कोई एक्सेप्शन्स नहीं उठाया जाता है, और यह कोई भी नहीं रिटर्न करता है
C.
Since “susan” is not a key in the set, Python raises a KeyError exception
चूँकि "सुसान" सेट में कोई की नहीं है,Python एक की एरर एक्सेप्शन्स को उठाता है
D.
Since “susan” is not a key in the set, Python raises a syntax error
चूंकि "सुसान" सेट में एक की नहीं है,Python एक सिंटेक्स एरर उठाता है
Question No# :
14
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# :
15
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# :
16
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# :
17
out of 50
Report Bug
Bookmark
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# :
18
out of 50
Report Bug
Bookmark
To add a new element to a list we use which command?
एक लिस्ट में एक न्यू एलिमेंट ऐड करने के लिए हम किस कमांड का यूज़ करते हैं?
A.
list1.add(5)
list1.add(5)
B.
list1.append(5)
list1.append(5)
C.
list1.addLast(5)
list1.addLast(5)
D.
list1.addEnd(5)
list1.addEnd(5)
Question No# :
19
out of 50
Report Bug
Bookmark
Which of the following is a mapping datatype?
निम्न में से कौन एक मैपिंग डेटाटाइप है?
A.
String
स्ट्रिंग
B.
List
लिस्ट
C.
Tuple
टपल
D.
Dictionary
डिक्शनरी
Question No# :
20
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# :
21
out of 50
Report Bug
Bookmark
Which one the following is a mutable data type ?
निम्नलिखित में से कौन सा एक परिवर्तनशील डेटा प्रकार है?
A.
set
set
B.
tuple
tuple
C.
string
string
D.
None of These
None of These
Question No# :
22
out of 50
Report Bug
Bookmark
Which of the following methods will create a copy of a list?
निम्नलिखित में से कौन सा मेथड किसी लिस्ट की एक कॉपी क्रिएट करेगी ?
A.
copy = list(original)
copy = list(original)
B.
copy = original[:]
copy = original[:]
C.
copy = original.copy()
copy = original.copy()
D.
All of the above
ऊपर के सभी
Question No# :
23
out of 50
Report Bug
Bookmark
How can you find the number of occurrences of an element in a tuple?
आप टपल में किसी एलिमेंट की अक्युरेन्सेस के नंबर को कैसे फाइंड कर सकते हैं?
A.
count()
count()
B.
len()
len()
C.
index()
index()
D.
find()
find()
Question No# :
24
out of 50
Report Bug
Bookmark
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
Question No# :
25
out of 50
Report Bug
Bookmark
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# :
26
out of 50
Report Bug
Bookmark
Suppose list1 is [1, 3, 2], What is list1 * 2?
मान लीजिए लिस्ट 1 [1, 3, 2] है,लिस्ट 1 * 2 क्या है?
A.
[2, 6, 4]
[2, 6, 4]
B.
[1, 3, 2, 1, 3]
[1, 3, 2, 1, 3]
C.
[1, 3, 2, 1, 3, 2]
[1, 3, 2, 1, 3, 2]
D.
[1, 3, 2, 3, 2, 1]
[1, 3, 2, 3, 2, 1]
Question No# :
27
out of 50
Report Bug
Bookmark
When we open file in append mode the file pointer is at the of the file?
जब हम फाइल को एपेंड मोड में खोलते हैं तो फाइल पॉइंटर फाइल के ____ पर होता है?
A.
anywhere in between the file
फ़ाइल के बीच में कही भी
B.
End
अंत
C.
beginning
आरम्भ में
D.
second line of the file
फ़ाइल की दूसरी पंक्ति
Question No# :
28
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# :
29
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# :
30
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
कोई नहीं
Question No# :
31
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# :
32
out of 50
Report Bug
Bookmark
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# :
33
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# :
34
out of 50
Report Bug
Bookmark
If b is a dictionary, what does any(b) do?
यदि b एक डिक्शनरी है, तो कोई भी (b) क्या करता है?
A.
Returns True if any key of the dictionary is true
यदि डिक्शनरी की कोई भी key सही है, तो रिटर्न
B.
Returns False if dictionary is empty
यदि डिक्शनरी खाली है तो गलत है
C.
Returns True if all keys of the dictionary are true
यदि डिक्शनरी की सभी keys सही हैं, तो सही
D.
Method any() doesn’t exist for dictionary
मैथड किसी भी () शब्दकोश के लिए मौजूद नहीं है
Question No# :
35
out of 50
Report Bug
Bookmark
Dictionary has:
डिक्सनरी में है:
A.
Sequence value pair
Sequence value pair
B.
Key value pair
Key value pair
C.
Tuple value pair
Tuple value pair
D.
Record value pair
Record value pair
Question No# :
36
out of 50
Report Bug
Bookmark
Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
मान लीजिए कि लिस्ट 1 है [4, 2, 2, 4, 5, 2, 1, 0], निम्न में से कौन सा स्लाइसिंग ऑपरेशन के लिए करेक्ट सिन्टैक्स है?
A.
print(list1[0])
print(list1[0])
B.
print(list1[:2])
print(list1[:2])
C.
print(list1[:-2])
print(list1[:-2])
D.
all of the mentioned
सभी का उल्लेख है
Question No# :
37
out of 50
Report Bug
Bookmark
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# :
38
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# :
39
out of 50
Report Bug
Bookmark
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# :
40
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# :
41
out of 50
Report Bug
Bookmark
Which of the following methods can be used with a tuple?
निम्नलिखित में से किस मेथड का यूज़ टपल के साथ किया जा सकता है?
A.
append()
append()
B.
insert()
insert()
C.
index()
index()
D.
remove()
remove()
Question No# :
42
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# :
43
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# :
44
out of 50
Report Bug
Bookmark
Which method is used to get all keys from a dictionary?
डिक्शनरी से सभी कीज़ प्राप्त करने के लिए किस मेथड का यूज़ किया जाता है?
A.
keys()
keys()
B.
getkeys()
getkeys()
C.
allkeys()
allkeys()
D.
keyvalues()
keyvalues()
Question No# :
45
out of 50
Report Bug
Bookmark
Which of the following statements create a dictionary?
निम्नलिखित में से कौन सा स्टेट्मेंट एक ड़िक्शनरी बनाता है?
A.
d = {}
d = {}
B.
d = {“john”:40, “peter”:45}
d = {“john”:40, “peter”:45}
C.
d = {40:”john”, 45:”peter”}
d = {40:”john”, 45:”peter”}
D.
All of the mentioned
सभी का उल्लेख
Question No# :
46
out of 50
Report Bug
Bookmark
Which of the following methods is not a string method in Python?
निम्नलिखित में से कौन सा मेथड पायथन में एक स्ट्रिंग मेथड नहीं है?
A.
capitalize()
capitalize()
B.
startswith()
startswith()
C.
pop()
pop()
D.
find()
find()
Question No# :
47
out of 50
Report Bug
Bookmark
Which of the following is not a valid set operation in python?
निम्नलिखित में से कौन सा पायथन में वैध सेट ऑपरेशन नहीं है?
A.
Union
Union
B.
Intersection
Intersection
C.
Difference
Difference
D.
None of the above
None of the above
Question No# :
48
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# :
49
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# :
50
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
कोई नहीं
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