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

What is the output of the following program ? print "Hello World".[::-1]
निम्नलिखित प्रोग्राम का आउटपुट क्या है? print "Hello World".[::-1]

Questions No: 2/50

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

Questions No: 3/50

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

Questions No: 4/50

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

Questions No: 5/50

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

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

If we have two sets, s1 and s2, and we want to check if all the elements of s1 are present in s2 or not, we can use the function:
यदि हमारे पास दो सेट हैं, s1 और s2, और हम यह चेक करना चाहते हैं कि s1 के सभी एलिमेंट s2 में मौजूद हैं या नहीं, हम फ़ंक्शन का यूज़ कर सकते हैं:

Questions No: 8/50

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

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

Questions No: 9/50

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

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

Questions No: 10/50

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

Questions No: 11/50

What will be the output of the following Python code?

matrix = [[1, 2, 3, 4],
         [4, 5, 6, 7],
         [8, 9, 10, 11],
         [12, 13, 14, 15]]  
for i in range(0, 4):
      print(matrix[i][1], end = " ")

Questions No: 12/50

What will be the output of the following expression?

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

Questions No: 13/50

What will be the output of the following Python code?

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

Questions No: 14/50

The ____________ function removes the first element of a set and the last element of a list.
____________ फ़ंक्शन सेट का फर्स्ट एलिमेंट् और किसी लिस्ट का लास्ट एलिमेंट निकालता है।

Questions No: 15/50

Suppose d = {“john”:40, “peter”:45}. To obtain the number of entries in dictionary which command do we use?
मान लीजिए d= {"जॉन": 40, "पीटर": 45}। ड़िक्शनरी में एंट्रीज के नंबर्स प्राप्त करने के लिए हम किस कमांड का यूज़ करते हैं?

Questions No: 16/50

lstrip() method is used for :
lstrip () फंक्शन का उपयोग इसके लिए किया जाता है:

Questions No: 17/50

What will be the output of the following Python code?

mylist=list("a#b#c#d".split('#'))
print(mylist)

Questions No: 18/50

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

Questions No: 19/50

Python allows ____ operations on string data type .
पायथन स्ट्रिंग डेटा प्रकार पर ____ऑपरेशन की अनुमति देता है।

Questions No: 20/50

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

print(''.isdigit())

Questions No: 21/50

What will be the output of the following Python code?

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

Questions No: 22/50

What will be the output of the following ?

print((range(4)))

Questions No: 23/50

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

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

What will be the output of the following Python code?

a=[(2,4),(1,2),(3,9)]
a.sort()
print(a)

Questions No: 26/50

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

Questions No: 27/50

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

Questions No: 28/50

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

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

Questions No: 29/50

What will be the output of the following Python code?

print("abcdef".find("cd"))

Questions No: 30/50

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

Questions No: 31/50

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

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

Questions No: 32/50

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

Questions No: 33/50

What will be the output of the following Python code?

print('abcdefcdgh'.partition('cd'))

Questions No: 34/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: 35/50

Which of the following is not a declaration of the dictionary?
निम्नलिखित में से कौन सा ड़िक्शनरी का डिक्लेरेशन नहीं है?

Questions No: 36/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: 37/50

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

Questions No: 38/50

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

Questions No: 39/50

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

Questions No: 40/50

Assume q= [3, 4, 5, 20, 5, 25, 1, 3], then what will be the items of q list after q.pop(1) ?
मान लीजिए q= [3, 4, 5, 20, 5, 25, 1, 3], तो q.pop(1) के बाद q सूची में क्या आइटम होंगे?

Questions No: 41/50

If a is a dictionary with some key-value pairs, what does a.popitem() do?
यदि कुछ की-वैल्यू वाले पेअर के साथ एक ड़िक्शनरी है,तो a.popitem () क्या करता है?

Questions No: 42/50

Suppose a list with name arr, contains 5 elements. You can get the 2nd element from the list using:
मान लीजिए कि arr नाम वाली एक सूची में 5 एलिमेन्ट हैं। आप सूची से दूसरा एलिमेन्ट प्राप्त कर सकते हैं:

Questions No: 43/50

Suppose a list with name arr, contains 5 elements. You can get the 2nd element from the list using :
मान लीजिए arr नाम वाली एक सूची में 5 तत्व हैं। आप सूची से दूसरा तत्व प्राप्त कर सकते हैं:

Questions No: 44/50

Which of the following is the correct way to check if a value exists in a list?
किसी लिस्ट में कोई मान मौजूद है या नहीं इसकी जाँच करने का निम्नलिखित में से कौन सा सही तरीका है?

Questions No: 45/50

What will be the output of the following Python code?

print('xyyzxxyxyy'.lstrip('xyy'))

Questions No: 46/50

What will be the output of the following Python code?

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

Questions No: 47/50

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

Questions No: 48/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: 49/50

What is the output when we execute

list("hello") ? 

Questions No: 50/50

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

print('abc'.islower())