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

What is the output of the following code ?

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

Questions No: 2/50

What will be the output of following statement ?

>>>"m"+"n1"

Questions No: 3/50

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('xyy', 2, 11))

Questions No: 4/50

What is the output of the following statement ?

print ((2, 4) + (1, 5))

Questions No: 5/50

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

print('11'.isnumeric())

Questions No: 6/50

What will be the output of the following Python code?

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

Questions No: 7/50

What will be the output of the following code snippet?

a=[1,2,3,4,5,6,7,8,9]
a[::2]=10,20,30,40,50,60
print(a)

Questions No: 8/50

Which function returns the exact copy of the string with the first letter in uppercase.
कौन सा फंक्शन अपरकेस में पहले अक्षर के साथ स्ट्रिंग की सटीक प्रतिलिपि देता है।

Questions No: 9/50

Which of the following Statement will create a Tuple:
निम्नलिखित में से कौन सा स्टेट्मेंट एक टपल क्रिएट करेगा:

Questions No: 10/50

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 क्या है।

Questions No: 11/50

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

a={}
a['a']=1
a['b']=[2,3,4] 
print(a)

Questions No: 12/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: 13/50

What is the output of following code

x = [1, 2, 3]
print(x[1:10])

Questions No: 14/50

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

Questions No: 15/50

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

print('1.1'.isnumeric())



Questions No: 16/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: 17/50

What will be the output of the following Python code?

x = ['ab', 'cd']
for i in x:
    i.upper() 
print(x)

Questions No: 18/50

What will be the output of the following Python code?

str1="helloworld"
print(str1[::-1])

Questions No: 19/50

What will be the output of the following Python code?

 word1="Apple"
word2="Apple"
list1=[1,2,3]
list2=[1,2,3]
print(word1 is word2)
print(list1 is list2)

Questions No: 20/50

What will be the output of the following Python code?

print(max("what are you"))

Questions No: 21/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: 22/50

What is the output of the following code?

a = {1:"A", 2: "B", 3: "C"}
b = {4: "D", 5: "E"}
a.update(b)
print(a)

Questions No: 23/50

What is “Hello”.replace(“l”, “e”)?
"हैलो" .replace ("l", "e") क्या है?

Questions No: 24/50

What will be the output?

d = {"a": 1, "b": 2}
print(2 in d)

Questions No: 25/50

What does the strip() method do in Python?
पायथन में स्ट्रिप() विधि क्या करती है?

Questions No: 26/50

which function is used to remove last item from a list?
किसी लिस्टसे अंतिम आइटम को हटाने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

Questions No: 27/50

Which statement is correct
कौन सा कथन सही है

Questions No: 28/50

Dictionary has:
डिक्सनरी में है:

Questions No: 29/50

What is the output of the following?

print(max([1, 2, 3, 4.] [4, 5, 6], [7]))

Questions No: 30/50

What will be the output of the following Python code?

print('xyxxyyzxxy'.lstrip('xyy'))

Questions No: 31/50

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

Questions No: 32/50

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 क्या है?

Questions No: 33/50

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

Questions No: 34/50

What is the output of following code

a = [1,2,3]
del a[1]
print(a)

Questions No: 35/50

Which of the following statements is used to create an empty set?
एम्प्टी सेट क्रिएट करने के लिए निम्नलिखित में से किस स्टेट्मेंट का यूज़ किया जाता है?

Questions No: 36/50

What is the output when we execute list(“hello”)?
जब हम लिस्ट ("हैलो") एक्सक्यूट करते हैं तो आउटपुट क्या है?

Questions No: 37/50

Which of the following methods is used to check if a string starts with a specific prefix?
निम्नलिखित में से किस मेथड का यूज़ यह चेक करने के लिए किया जाता है कि कोई स्ट्रिंग किसी स्पेसिफ़िक प्रीफ़िक्स से स्टार्ट होती है या नहीं?

Questions No: 38/50

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

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

Questions No: 39/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: 40/50

Which one of the following is immutable data type ?
निम्नलिखित में से कौन सा इम्म्यूटेबल डेटा टाइप है?

Questions No: 41/50

"hello,world".[-6], what value print?
"hello,world".[-6], का आउटपुट क्या होगा?

Questions No: 42/50

Which statement is correct??
कौन सा कथन सही है??

Questions No: 43/50

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

numbers = {}
letters = {}
comb = {}
numbers[1] = 56
numbers[3] = 7
letters[4] = 'B'
comb['Numbers'] = numbers 
comb['Letters'] = letters
print(comb)

Questions No: 44/50

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

x = 'abcd'
for i in range(len(x)):
    x[i].upper()
print (x)

Questions No: 45/50

What function do you use to read a string?
एक स्ट्रिंग को रीड करने के लिए आप किस फ़ंक्शन का यूज़ करते हैं?

Questions No: 46/50

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

print('abcdefcdghcd'.split('cd', -1))

Questions No: 47/50

To return the length of string s what command do we execute?
स्ट्रिंग की लेंथ रिटर्न करने के लिए हम किस कमांड को एक्सक्यूट करते हैं?

Questions No: 48/50

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

Questions No: 49/50

What will be printed?

a = [[1, 2], [3, 4]]
print(a[1][0])

Questions No: 50/50

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