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

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

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

Questions No: 2/50

Which of these about a frozenset is not true?
फ्रोजेनसेट के बारे में इनमें से कौन सा सच नहीं है?

Questions No: 3/50

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

Questions No: 4/50

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

>>> a={1:"A",2:"B",3:"C"}
>>> del a

Questions No: 5/50

To insert 5 to the third position in list1, we use which command?
लिस्ट 1 में 5 से थर्ड पोज़िशन पर इन्सर्ट करने के लिए, हम किस कमांड का यूज़ करते हैं?

Questions No: 6/50

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

 d = {"john":40, "peter":45}
print(list(d.keys()))

Questions No: 7/50

What will happen if you try to access a key that doesn’t exist in a dictionary?
यदि आप किसी ऐसी की तक पहुंचने का प्रयास करते हैं जो ड़िक्शनरी में मौजूद नहीं है तो क्या होगा?

Questions No: 8/50

What type of data is : arr=[(1,1),(2,2),(3,3)]?
किस प्रकार का डेटा है: arr=[(1,1),(2,2),(3,3)]?

Questions No: 9/50

Which of the following will return reverse string str1?
निम्नलिखित में से कौन रिवर्स स्ट्रिंग str1 रिटर्न करेगा?

Questions No: 10/50

Which of the following methods can be used with a tuple?
निम्नलिखित में से किस मेथड का यूज़ टपल के साथ किया जा सकता है?

Questions No: 11/50

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

Questions No: 12/50

Which of the following function returns the index value of first occurrence of substring occurring in the given string.
निम्नलिखित में से कौन सा फंक्शन दिए गए स्ट्रिंग में होने वाली सबस्ट्रिंग के पहले अकरेन्स की इन्डेक्स वैल्यू देता है।

Questions No: 13/50

What is the output of the following statement ?

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

Questions No: 14/50

What will be the output?

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

Questions No: 15/50

What is the output when we execute list("hello")?
जब हम list ( "hello") निष्पादित करते हैं तो आउटपुट क्या है?

Questions No: 16/50

Each individual character in a string can be accessed using a technique called _____ .
एक स्ट्रिंग में प्रत्येक इनडिविजुअल कैरेक्टर को ____ ...नामक तकनीक का उपयोग करके एक्सेस किया जा सकता है

Questions No: 17/50

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

Questions No: 18/50

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

Questions No: 19/50

Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?
मान लीजिए कि लिस्ट 1 है [2, 33, 222, 14, 25], लिस्ट 1 [-1] क्या है?

Questions No: 20/50

What will be the output of the following Python code?

a=[10,23,56,[78]]
b=list(a)
a[3][0]=95
a[1]=34
print(b)

Questions No: 21/50

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

Questions No: 22/50

What will be the output of the following Python code?

count={}
count[(1,2,4)] = 5
count[(4,2,1)] = 7
count[(1,2)] = 6
count[(4,2,1)] = 2
tot = 0
for i in count:
    tot=tot+count[i]
print(len(count)+tot)

Questions No: 23/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: 24/50

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

Questions No: 25/50

What type of data is: a=[(1,1),(2,4),(3,9)]?
किस प्रकार का डेटा है: a = [(1,1), (2,4), (3,9)]?

Questions No: 26/50

What will be the output of the following Python code?

>>> a={5,6,7}
>>> sum(a,5)

Questions No: 27/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: 28/50

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

Questions No: 29/50

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

Questions No: 30/50

What will be the output of the following Python code?

print('abcd'.partition('cd'))

Questions No: 31/50

What will be the output of the following Python code?

d = {0, 1, 2}
for x in d.values():
    print(x)

Questions No: 32/50

What is the correct way to create a tuple with a single element?
किसी सिंगल एलिमेंट से टपल क्रिएट करने का सही तरीका क्या है?

Questions No: 33/50

Which data type is mutable in Python?
पाइथन में कौन सा डेटा प्रकार म्यूटेबल है?

Questions No: 34/50

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

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

Questions No: 35/50

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

Questions No: 36/50

Which symbol is used to access list elements?
सूची के तत्वों तक पहुँचने के लिए किस प्रतीक का उपयोग किया जाता है?

Questions No: 37/50

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

Questions No: 38/50

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

Questions No: 39/50

What will be the output of the following Python code?

def m(list):
    v = list[0]
    for e in list:
        if v < e:
            v = e
    return v
   
values = [[3, 4, 5, 1], [33, 6, 1, 2]]   
for row in values: 
      print(m(row), end = " ")

Questions No: 40/50

Which of the following is a mapping datatype?
निम्न में से कौन एक मैपिंग डेटाटाइप है?

Questions No: 41/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: 42/50

Suppose d = {“john”:40, “peter”:45}, what happens when we try to retrieve a value using the expression d[“susan”]?
मान लीजिए कि d = {&quot;जॉन&quot;: 40, &quot;पीटर&quot;: 45}, तब क्या होता है जब हम एक्सप्रेशन का यूज़ करते हुए value प्राप्त करने का प्रयास करते हैं d[“susan”]?

Questions No: 43/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: 44/50

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

Questions No: 45/50

What will be the output of the following Python code?

a={'B':5,'A':9,'C':7}
print(sorted(a))

Questions No: 46/50

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

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

Questions No: 47/50

What will be the output of the following Python code?

a=[13,56,17]
a.append([87])
a.extend([45,67])
print(a)


Questions No: 48/50

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

Questions No: 49/50

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

Questions No: 50/50

What will be the output of the following Python code?

print("xyyzxyzxzxyy".endswith("xyy"))