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

What will be the output of the following Python code?

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

Questions No: 2/50

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

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

Questions No: 3/50

What will be the output of the following Python code?

a={1:"A",2:"B",3:"C"}
b={4:"D",5:"E"}
a.update(b) 
print(a)

Questions No: 4/50

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

Questions No: 5/50

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

Questions No: 6/50

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

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

Questions No: 7/50

When we open file in append mode the file pointer is at the of the file?
जब हम फाइल को एपेंड मोड में खोलते हैं तो फाइल पॉइंटर फाइल के ____ पर होता है?

Questions No: 8/50

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

d = {"john":40, "peter":45}
print(d["john"])

Questions No: 9/50

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

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

Questions No: 10/50

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

Questions No: 11/50

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

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

Questions No: 12/50

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('xyy', -10, -1))

Questions No: 13/50

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

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

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

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

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

What is the output of following code

a = [5,2,3]
print(a[5:])

Questions No: 19/50

what is the output of the following code?

M=['b' *x for x in range(4)]
print(M)

Questions No: 20/50

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

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

Questions No: 21/50

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

test = {1:'A', 2:'B', 3:'C'}
del test[1]
test[1] = 'D'
del test[2]
print(len(test))

Questions No: 22/50

Which method is used to get all keys from a dictionary?
डिक्शनरी से सभी कीज़ प्राप्त करने के लिए किस मेथड का यूज़ किया जाता है?

Questions No: 23/50

What will be the result?

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

Questions No: 24/50

What will be the output of the following Python code?

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

Questions No: 25/50

What will be the output of the following Python code?

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

Questions No: 26/50

To shuffle the list(say list1) what function do we use?
लिस्ट में शफल (फेरबदल) करने के लिए (say list1) हम किस फ़ंक्शन का यूज़ करते हैं?

Questions No: 27/50

What will be the output of the following Python code?

print('Hello!2@#World'.istitle())

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

What is the correct command to shuffle the following list?

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

Questions No: 30/50

What will be the output of the following Python code?

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

Questions No: 31/50

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

Questions No: 32/50

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

Questions No: 33/50

List is mutable and Tuple is immutable?
लिस्ट परिवर्तनशील है और टपल अपरिवर्तनीय है?

Questions No: 34/50

What will be the output of the following code?

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

Questions No: 35/50

What is the output of the following program:

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

Questions No: 36/50

What will be the output of the following Python code?

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

Questions No: 37/50

What will be the output of the following Python code?

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

Questions No: 38/50

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

Questions No: 39/50

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

Questions No: 40/50

What data type is the object below ?

L=[1, 23, 'hello', 1]

Questions No: 41/50

What will be the output of the following Python code?

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

Questions No: 42/50

Which of the following statements create a dictionary?
निम्नलिखित में से कौन सा स्टेट्मेंट एक ड़िक्शनरी बनाता है?

Questions No: 43/50

What will be the output?

dict1={'a':[3,6,8]}
print(len(dict1))

Questions No: 44/50

What will be the output of the following Python code?

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

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

Set makes use of __________ Dictionary makes use of ____________
सेट __________ का यूज़ करता है शब्दकोश ____________ का यूज़ करता है

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

What will be the output of the following ?

print((range(4)))

Questions No: 49/50

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

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

Questions No: 50/50

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