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

What will be the output of the following Python code?

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

Questions No: 2/50

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

Questions No: 3/50

If a={5,6,7}, what happens when a.add(5) is executed?
यदि a = {5,6,7}, तो क्या होता है जब a.add (5) निष्पादित होता है?

Questions No: 4/50

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('yy', 1))

Questions No: 5/50

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

Questions No: 6/50

Suppose list1 is [1, 3, 2], What is list1 * 2?
मान लीजिए लिस्ट 1 [1, 3, 2] है,लिस्ट 1 * 2 क्या है?

Questions No: 7/50

What will be the output of the following Python code?

names = ['Amir', 'Bear', 'Charlton', 'Daman']
print(names[-1][-1])

Questions No: 8/50

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

Questions No: 9/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: 10/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: 11/50

What does the update() method do in a dictionary?
अपडेट() मेथड किसी ड़िक्शनरी में क्या करती है?

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

What is the output of the following program:

print ("Hello World"[::-1])

Questions No: 14/50

What is a Python dictionary?
पायथन डिक्शनरी क्या है?

Questions No: 15/50

Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
मान लीजिए कि list1 = [0.5 * x for x in range(0, 4)], list1 है:

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

What will be the output of the following Python code?

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

Questions No: 18/50

What will be the output of the following Python code?

print("xyyzxyzxzxyy".endswith("xyy", 0, 2))

Questions No: 19/50

What is the correct command to shuffle the following list?

fruit=['apple', 'banana', 'papaya', 'cherry']

Questions No: 20/50

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”]?

Questions No: 21/50

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

Questions No: 22/50

What will be the output of the following Python code?

def f(values):
    values[0] = 44
   
v = [1, 2, 3]
f(v)
print(v)

Questions No: 23/50

What will be the output of the following Python code?

print('1Rn@'.lower())

Questions No: 24/50

To remove string "hello" from list1, we use which command ?
लिस्ट 1 से स्ट्रिंग "हैलो" को हटाने के लिए, हम किस कमांड का उपयोग करते हैं?

Questions No: 25/50

What will tuple('abc') return?
tuple('abc') क्या रिटर्न करेगा ?

Questions No: 26/50

What will be the output of the following Python code?

a={1:"A",2:"B",3:"C"}
for i in a: 
    print(i,end=" ")

Questions No: 27/50

Suppose list1 is [2445,133,12454,123], what is max(list1)?
मान लीजिए कि लिस्ट 1 है [2445,133,12454,123],Max (लिस्ट1) क्या है?

Questions No: 28/50

Which of the following function of dictionary gets all the keys from the dictionary
निम्नलिखित में से डिक्शनरी का कौन सा फ़ंक्शन डिक्शनरी से सभी की निकालने के लिए किया जाता है

Questions No: 29/50

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

Questions No: 30/50

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

Questions No: 31/50

What will be the output of the following Python code?

a=["Apple","Ball","Cobra"]
a.sort(key=len)
print(a)

Questions No: 32/50

What will be the output of the following Python code?

data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
def ttt(m):
    v = m[0][0]
    for row in m:
        for element in row:
            if v < element: v = element     
        return v
print(ttt(data[0]))

Questions No: 33/50

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

print('ab cd ef'.title())

Questions No: 34/50

If a=(1,2,3,4), a[1:-1] is _________
यदि a = (1,2,3,4), एक [1: -1] _________ है

Questions No: 35/50

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

Questions No: 36/50

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

Questions No: 37/50

How can you find the number of occurrences of an element in a tuple?
आप टपल में किसी एलिमेंट की अक्युरेन्सेस के नंबर को कैसे फाइंड कर सकते हैं?

Questions No: 38/50

What will be the output of the following Python code?

list1 = [11, 2, 23]
list2 = [11, 2, 2]
print(list1 < list2)

Questions No: 39/50

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

Questions No: 40/50

What will be the output of following statement ?

>>>"m"+"n1"

Questions No: 41/50

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

Questions No: 42/50

Which one is not a built in function
इनमें से कौन सा बिल्ट इन फंक्शन नहीं है?

Questions No: 43/50

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

Questions No: 44/50

In which of the following data type, duplicate items are not allowed ?
निम्नलिखित में से किस डेटा प्रकार में डुप्लीकेट आइटम की अनुमति नहीं है?

Questions No: 45/50

Suppose i is 5 and j is 4, i + j is same as ________
मान लीजिए कि i 5 है और j 4 है, i + j ________ के समान है

Questions No: 46/50

What will be the output of the following Python code?

values = [[3, 4, 5, 1 ], [33, 6, 1, 2]]
for row in values:
    row.sort()
    for element in row:
        print(element, end = " ")
    print()

Questions No: 47/50

What will be the output of the following Python code?

print('ab'.isalpha())

Questions No: 48/50

What will be the output of the following Python code?

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

Questions No: 49/50

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

print('Hello World'.istitle())

Questions No: 50/50

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