O Level - Sequence Data Types In Python
Questions No: 1/50

What will be the output of the following Python code snippet?

print('1.1'.isnumeric())



Questions No: 2/50

What will be the output of the following Python code snippet?

a = [0, 1, 2, 3]
for a[-1] in a:
    print(a[-1])

Questions No: 3/50

What is the output of the following code?

a = set('dcma')
b = set('mlpc')
print(a^b)

Questions No: 4/50

What will be the output of the following Python code?

print('abcdef'.partition('cd'))

Questions No: 5/50

A sequence of immutable objects is called
अपरिवर्तनीय वस्तुओं का क्रम कहलाता है

Questions No: 6/50

What will be the output of the following Python code?

 a=[1,2,3]
b=a.append(4)
print(a)
print(b)

Questions No: 7/50

To add a new element to a list we use which Python command?
लिस्ट में एक नया आइटम जोड़ने के लिए हम किस पायथन कमांड का उपयोग करते हैं?

Questions No: 8/50

What will be the output of the following Python code snippet?

print('xyyxyyxyxyxxy'.replace('xy', '12', 100))

Questions No: 9/50

If a={5,6,7,8}, which of the following statements is false?
यदि a = {5,6,7,8}, निम्नलिखित में से कौन सा स्टेट्मेंट गलत है?

Questions No: 10/50

What will be the output of the following Python code?

tuple1=(5,1,7,6,2)
tuple1.pop(2)
print(tuple1)

Questions No: 11/50

Which of the following creates a set?
निम्न में से कौन set बनाता है?

Questions No: 12/50

What does the following slice return?

s = [0,1,2,3,4,5]
print(s[1:5:2])

Questions No: 13/50

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], निम्न में से कौन सा स्लाइसिंग ऑपरेशन के लिए करेक्ट सिन्टैक्स है?

Questions No: 14/50

Which of the following functions will return the symmetric difference between two sets, x and y?
निम्नलिखित में से कौन सा कार्य दो सेटों, x और y के बीच सिमेट्रिक डिफ्रेंस को रिटर्न करेगा ?

Questions No: 15/50

What is the data type of (1)?
(1) का डेटा प्रकार क्या है?

Questions No: 16/50

What will be the output of the following Python code snippet?

d1 = {"john":40, "peter":45}
d2 = {"john":466, "peter":45}
print(d1 == d2)

 

Questions No: 17/50

Which of the following isn’t true about dictionary keys?
निम्नलिखित में से कौन ड़िक्शनरी keys के बारे में सही नहीं है?

Questions No: 18/50

What is the output of following code

x = [10, 20, 30]
print(x * 0)

Questions No: 19/50

What is the output?

s = "Python"
print(s[-1:-4])

Questions No: 20/50

What will be the output of the following Python code?

d = {0: 'a', 1: 'b', 2: 'c'}
for i in d:
    print(i)

Questions No: 21/50

What will be the output of the following Python code?

list1 = [1, 3]
list2 = list1
list1[0] = 4
print(list2)

Questions No: 22/50

What will be the output of the following Python code?

list1=[1,3]
list2=list1
list1[0]=4
print(list2)

Questions No: 23/50

Suppose d = {“john”:40, “peter”:45}, to delete the entry for “john” what command do we use?
मान लीजिए कि d = {"जॉन": 40, "पीटर": 45}, "जॉन" के लिए एंट्री डिलीट करने के लिए,हम किस कमांड का यूज़ करते हैं?

Questions No: 24/50

What will be the output?

a = [1, 2, 3]
a.insert(1, 10)
print(a)

Questions No: 25/50

Which of the following will delete key-value pair for key="tiger" in dictionary?

dic={"lion":"'wild","tiger":"'wild",'cat":"domestic","dog":"domestic"}

Questions No: 26/50

What will be the output of the following Python code?

d1={"abc":5,"def":6,"ghi":7}
print(d1[0])

Questions No: 27/50

What will be the output of the following Python code snippet?

test = {1:'A', 2:'B', 3:'C'}
del test[1]
test[1] = 'D'
del test[2]
print(len(test))

Questions No: 28/50

Which data type is immutable?
कौन सा डेटा प्रकार अपरिवर्तनीय है?

Questions No: 29/50

What will be the output of the following Python code?

string = "my name is x"
for i in string.split():
    print (i, end=", ")

Questions No: 30/50

What will be the output of the following Python code?

x = 'abcd'
for i in x:
    print(i)
    x.upper()

Questions No: 31/50

Which method is used to add an element to the end of a list?
किसी लिस्ट के एन्ड में कोई एलिमेंट्स जोड़ने के लिए किस मेथड का यूज़ किया जा

Questions No: 32/50

Which predefined Python function is used to find length of String()
किस पूर्वनिर्धारित पायथन फंक्शन का उपयोग लंबाई को फाइन्ड के लिए किया जाता है।

Questions No: 33/50

To shuffle the list(say list1) what function do we use?
लिस्ट में शफल (फेरबदल) करने के लिए (say list1) हम किस फ़ंक्शन का यूज़ करते हैं?

Questions No: 34/50

what is the output of the following code?

M=['b' *x for x in range(4)]
print(M)

Questions No: 35/50

When we open file in append mode the file pointer is at the of the file?
जब हम फाइल को एपेंड मोड में खोलते हैं तो फाइल पॉइंटर फाइल के ____ पर होता है?

Questions No: 36/50

What will be the output of the following expression?

a = 2
b = 8
print(a|b )
print(a >> 1)

Questions No: 37/50

What happens if you attempt to access an index that is out of range in a list?
यदि आप किसी ऐसे इंडेक्स तक पहुँचने का प्रयास करते हैं जो किसी लिस्ट के रेंज से बाहर है तो क्या होगा?

Questions No: 38/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 क्या है।

Questions No: 39/50

What will be the output of the following Python code snippet?

print('abcdef12'.replace('cd', '12'))

Questions No: 40/50

What will be the output of the following Python code?

a={1:"A",2:"B",3:"C"}
print(a.items())

Questions No: 41/50

List is mutable and Tuple is immutable?
लिस्ट परिवर्तनशील है और टपल अपरिवर्तनीय है?

Questions No: 42/50

What will be the output of the following Python code snippet?

d = {"john":40, "peter":45}
print("john" in d)

 

Questions No: 43/50

What does the function re.match do?
फंक्शन re-match क्या करता है?

Questions No: 44/50

Which one the following is a mutable data type ?
निम्नलिखित में से कौन सा एक परिवर्तनशील डेटा प्रकार है?

Questions No: 45/50

What will be the output of the following Python code?

string = "my name is x"
for i in string:
    print (i, end=", ")

Questions No: 46/50

What is the output of the following code ?

ms = ('A','D', 'H','U','N','I','C')
print(ms[1:4])

Questions No: 47/50

Which method is used to get all keys from a dictionary?
डिक्शनरी से सभी कीज़ प्राप्त करने के लिए किस मेथड का यूज़ किया जाता है?

Questions No: 48/50

What will be the output?

a = [1, 2, 3]
b = a
b.append(4)
print(a)

Questions No: 49/50

Which of the statements about dictionary values if false?
ड़िक्शनरी वैल्यूज में से कौन सा स्टेट्मेंट यदि गलत है?

Questions No: 50/50

which of the following are valid string manipulation function in python
निम्नलिखित में से कौन सा पायथन में मान्य स्ट्रिंग मैनिपुलेशन फ़ंक्शन है