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

If wd="Hello World" then which of the following statements will display last five characters of the string object?

Questions No: 2/50

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

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

Questions No: 3/50

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

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

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

print('1.1'.isnumeric())



Questions No: 7/50

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

Questions No: 8/50

Which of these about a dictionary is false?
एक ड़िक्शनरी के बारे में इनमें से कौन गलत है?

Questions No: 9/50

What will be the output of the following Python code?

a={1:"A",2:"B",3:"C"}
b=a.copy()
b[2]="D" 
print(a)

Questions No: 10/50

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

Questions No: 11/50

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

print('abcdefcdghcd'.split('cd'))

Questions No: 12/50

Suppose list1 is [1, 5, 9], what is sum(list1)?
मान लीजिए कि लिस्ट1 है [1, 5, 9],sum (लिस्ट1) क्या है?

Questions No: 13/50

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

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

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

Questions No: 17/50

What will be the output of the following Python code?

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

Questions No: 18/50

What does the following code print ?

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

Questions No: 19/50

The data structure which is a mutable ordered sequence of elements is called
डेटा संरचना जो तत्वों का एक परिवर्तनशील क्रमबद्ध अनुक्रम है, कहलाती है

Questions No: 20/50

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

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

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

Which function is used to add an element (5) in the list1?
लिस्ट 1 में एक एलिमेंट (5 ) जोड़ने के लिए किस फंक्शन का प्रयोग किया जाता है ?

Questions No: 23/50

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

print('Ab!2'.swapcase())

Questions No: 24/50

What will be the output of the following Python code?

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

Questions No: 25/50

What will be the output of the following Python code?

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

Questions No: 26/50

What will be the output of the following Python code?

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

Questions No: 27/50

What will be the output of the following Python code?

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

Questions No: 28/50

What will be the output of the following Python code?

>>>max("what are you")

Questions No: 29/50

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

Questions No: 30/50

What will be the output of the following code?

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

Questions No: 31/50

What will be the output of the following Python code?

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

Questions No: 32/50

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

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

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

print('abc'.islower())

Questions No: 35/50

What will be the output of the following Python code?

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

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

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

Questions No: 38/50

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

print(''.isdigit())

Questions No: 39/50

To add a new element to a list we use which Python command?
लिस्ट में एक नया आइटम जोड़ने के लिए हम किस पायथन कमांड का उपयोग करते हैं?

Questions No: 40/50

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

Questions No: 41/50

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

Questions No: 42/50

What will be the output of the following Python code?

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

Questions No: 43/50

What will be the output of the following Python code?

example = "helle"
print(example.find("e"))

Questions No: 44/50

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

Questions No: 45/50

What will be the output of the following Python code?

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

Questions No: 46/50

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

Questions No: 47/50

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

print('a@ 1,'.islower())

Questions No: 48/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 row in range(0, len(values)):
    for column in range(0, len(values[row])):
        if v < values[row][column]:
            v = values[row][column]
print(v)

Questions No: 49/50

What will be the output of the following Python code?

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

Questions No: 50/50

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

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