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
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# :
02
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# :
03
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# :
04
out of 50
Report Bug
Bookmark
To remove string "hello" from list1, we use which command ?
लिस्ट 1 से स्ट्रिंग "हैलो" को हटाने के लिए, हम किस कमांड का उपयोग करते हैं?
A.
list1.remove("hello")
list1.remove("hello")
B.
list1.remove(hello)
list1.remove(hello)
C.
list1.removeAll("hello")
list1.removeAll("hello")
D.
list1.removeOne ("hello")
list1.removeOne ("hello")
Question No# :
05
out of 50
Report Bug
Bookmark
If no delimiter is given in split() function then words are separated by
यदि split () फंक्शन में कोई डेलीमीटर नहीं दिया गया है तो शब्दों को ____द्वारा अलग किया जाता है
A.
space
स्पेस
B.
colon
कोलन
C.
semi colon
सेमी कोलन
D.
None
कोई नहीं
Question No# :
06
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# :
07
out of 50
Report Bug
Bookmark
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# :
08
out of 50
Report Bug
Bookmark
Which one of the following is immutable data type ?
निम्नलिखित में से कौन सा इम्म्यूटेबल डेटा टाइप है?
A.
list
लिस्ट
B.
set
सेट
C.
tuple
टपल
D.
dictionary
डिक्शनरी
Question No# :
09
out of 50
Report Bug
Bookmark
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# :
10
out of 50
Report Bug
Bookmark
Which of the following is a mapping datatype?
निम्न में से कौन एक मैपिंग डेटाटाइप है?
A.
String
स्ट्रिंग
B.
List
लिस्ट
C.
Tuple
टपल
D.
Dictionary
डिक्शनरी
Question No# :
11
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# :
12
out of 50
Report Bug
Bookmark
Which function returns the exact copy of the string with the first letter in uppercase.
कौन सा फंक्शन अपरकेस में पहले अक्षर के साथ स्ट्रिंग की सटीक प्रतिलिपि देता है।
A.
find()
find()
B.
copy()
copy()
C.
upper()
upper()
D.
capitalize()
capitalize()
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
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# :
15
out of 50
Report Bug
Bookmark
What type of data is : arr=[(1,1),(2,2),(3,3)]?
किस प्रकार का डेटा है: arr=[(1,1),(2,2),(3,3)]?
A.
List of tuple
List of tuple
B.
Tuple of List
Tuple of List
C.
Array of Tuples
Array of Tuples
D.
Invalid Type
Invalid Type
Question No# :
16
out of 50
Report Bug
Bookmark
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?
मान लीजिए सूची है। [3, 4, 5, 20, 5, 25, 1, 3], listExample.pop() के बाद लिस्ट1 क्या है।
A.
[3, 4, 5, 20, 5, 25, 1]
[3, 4, 5, 20, 5, 25, 1]
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# :
17
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# :
18
out of 50
Report Bug
Bookmark
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# :
19
out of 50
Report Bug
Bookmark
If a={5,6,7,8}, which of the following statements is false?
यदि a = {5,6,7,8}, निम्नलिखित में से कौन सा स्टेट्मेंट गलत है?
A.
print(len(a))
print(len(a))
B.
print(min(a))
print(min(a))
C.
a.remove(5)
a.remove(5)
D.
a[2]=45
a[2]=45
Question No# :
20
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# :
21
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# :
22
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# :
23
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# :
24
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# :
25
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# :
26
out of 50
Report Bug
Bookmark
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# :
27
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# :
28
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# :
29
out of 50
Report Bug
Bookmark
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# :
30
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# :
31
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# :
32
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# :
33
out of 50
Report Bug
Bookmark
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# :
34
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# :
35
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# :
36
out of 50
Report Bug
Bookmark
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# :
37
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# :
38
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# :
39
out of 50
Report Bug
Bookmark
What happens if you attempt to access an index that is out of range in a list?
यदि आप किसी ऐसे इंडेक्स तक पहुँचने का प्रयास करते हैं जो किसी लिस्ट के रेंज से बाहर है तो क्या होगा?
A.
It returns None.
यह कोई नहीं रिटर्न करता है।
B.
It raises an IndexError
यह एक IndexError उत्पन्न करता है
C.
It creates a new element at that index.
यह उस इंडेक्स पर एक नया एलिमेंट्स क्रिएट करता है।
D.
It returns an empty list.
यह एक एम्प्टी लिस्ट रिटर्न करता है।
Question No# :
40
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# :
41
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# :
42
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# :
43
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# :
44
out of 50
Report Bug
Bookmark
Suppose list1 is [1, 5, 9], what is sum(list1)?
मान लीजिए कि लिस्ट1 है [1, 5, 9],sum (लिस्ट1) क्या है?
A.
1
1
B.
9
9
C.
15
15
D.
Error
एरर
Question No# :
45
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# :
46
out of 50
Report Bug
Bookmark
Which of these about a frozenset is not true?
फ्रोजेनसेट के बारे में इनमें से कौन सा सच नहीं है?
A.
Mutable data type
म्यूटेबल डेटा टाइप
B.
Allows duplicate values
डुप्लिकेट वैल्यूज की अनुमति देता है
C.
Data type with unordered values
अव्यवस्थित वैल्यूज के साथ डेटा टाइप
D.
Immutable data type
इम्यूटबल डेटा टाइप
Question No# :
47
out of 50
Report Bug
Bookmark
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# :
48
out of 50
Report Bug
Bookmark
What function do you use to read a string?
एक स्ट्रिंग को रीड करने के लिए आप किस फ़ंक्शन का यूज़ करते हैं?
A.
input(“Enter a string”)
इनपुट(“Enter a string”)
B.
eval(input(“Enter a string”))
eval (इनपुट(“Enter a string”))
C.
enter(“Enter a string”)
एंटर(“Enter a string”)
D.
eval(enter(“Enter a string”))
eval(एंटर(“Enter a string”))
Question No# :
49
out of 50
Report Bug
Bookmark
Which of the following operations is NOT allowed on a tuple?
टपल पर निम्नलिखित में से किस ऑपरेशन की अनुमति नहीं है?
A.
Slicing
स्लाइसिंग
B.
Concatenation
कंकटेनशन
C.
Deletion of elements
एलिमेंट्स का विलोपन
D.
Iteration
इट्रेशन
Question No# :
50
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
कोई नहीं
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