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

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

Questions No: 2/50

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

Questions No: 3/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: 4/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: 5/50

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

Questions No: 6/50

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

Questions No: 7/50

What will be the output of the following Python code?

values = [[3, 4, 5, 1], [33, 6, 1, 2]]
v = values[0][0]
for lst in values:
    for element in lst:
        if v > element:
            v = element
print(v)

Questions No: 8/50

What will be the output of the following Python code?

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

Questions No: 9/50

Which of the following is a valid way to create an empty tuple?
निम्नलिखित में से कौन सा एक एम्प्टी टपल क्रिएट करने का वैध तरीका है?

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

Which of the following is true about Python strings?
पायथन स्ट्रिंग्स के बारे में निम्नलिखित में से कौन सा सत्य है?

Questions No: 12/50

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

Questions No: 13/50

What will be the output of the following Python code?

print(max("what are you"))

Questions No: 14/50

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

Questions No: 15/50

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

Questions No: 16/50

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

Questions No: 17/50

What will be the output of the following Python code?

print('ab,12'.isalnum())

Questions No: 18/50

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

Questions No: 19/50

What will be the output of the following Python code?

a={5,6,7,8}
b={7,8,9,10} 
print(len(a+b))

Questions No: 20/50

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

Questions No: 21/50

What will be the output of the following Python code?

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

Questions No: 22/50

What will be the output of the following Python code?

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

Questions No: 23/50

To add a new element to a list we use which command?
एक लिस्ट में एक न्यू एलिमेंट ऐड करने के लिए हम किस कमांड का यूज़ करते हैं?

Questions No: 24/50

What will be the output of the following Python code?

print('a B'.isalpha())

Questions No: 25/50

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

Questions No: 26/50

Which of the following is a Python tuple?
निम्नलिखित में से कौन एक Python tuple है?

Questions No: 27/50

What will be the output of the following Python code?

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

Questions No: 28/50

What will be the output of the following Python code?

x = "abcdef"
i = "a"
while i in x:
    x = x[1:]
    print(i, end = " ")

Questions No: 29/50

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

Questions No: 30/50

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

Questions No: 31/50

What will be the output of the following Python code?

a= [1, 2, 3, 4, 5]
for i in range(1, 5):
    a[i-1] = a[i]
for i in range(0, 5):
    print(a[i],end = " ")

Questions No: 32/50

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

total={}
def insert(items):
    if items in total:
        total[items] += 1
    else:
        total[items] = 1
insert('Apple')
insert('Ball')
insert('Apple') 
print (len(total))

Questions No: 33/50

What will be the output of the following Python code?

print("Welcome to Python".split())

Questions No: 34/50

Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?
मान लीजिए कि लिस्ट-एग्जाम्पल [‘h’,, e ’,, l’,, l ’,’ o ’] है, तो len (listExample) क्या है?

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

What will be the output of the following Python code?

x = "abcdef"
i = "a"
while i in x:
    x = x[:-1]
    print(i, end = " ")

Questions No: 37/50

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

Questions No: 38/50

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

Questions No: 39/50

What will be the output of the following Python code?

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

Questions No: 40/50

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

Questions No: 41/50

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

Questions No: 42/50

What will be the output of the following Python code?

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

Questions No: 43/50

What is the output of the following code?

list1=[2, 33, 222, 14, 25]
print(list1[ : -1 ])

Questions No: 44/50

Which one of the following is inmmutable data type?

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

What will be the output of the following Python code?

d = {0: 'a', 1: 'b', 2: 'c'}
for x in d.keys():
    print(d[x])

Questions No: 47/50

What will be the output of the following Python code?

points = [[1, 2], [3, 1.5], [0.5, 0.5]]
points.sort()
print(points)

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

How can we create an empty list in Python ?
हम पायथन में एक खाली लिस्ट कैसे बना सकते हैं?

Questions No: 50/50

Which of the following function returns True if the string is non empty and has all uppercase alphabets.
यदि स्ट्रिंग नॉन-इम्पटी है और सभी अपरकेस अक्षर हैं, तो निम्न में से कौन सा फंक्शन सही है।