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

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

Questions No: 2/50

What is the output of the following statement ?

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

Questions No: 3/50

What will be the output of the following Python code?

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

Questions No: 4/50

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

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

Questions No: 5/50

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

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

Questions No: 6/50

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

Questions No: 7/50

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

Questions No: 8/50

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

Questions No: 9/50

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

Questions No: 10/50

Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?
मान लीजिए कि लिस्ट 1 है [4, 2, 2, 4, 5, 2, 1, 0], निम्न में से कौन सा स्लाइसिंग ऑपरेशन के लिए करेक्ट सिन्टैक्स है?

Questions No: 11/50

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

Questions No: 12/50

What will be the output of the following Python code?

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

Questions No: 13/50

What will be the output?

t = (1, 2, 3)
t[1] = 5
print(t)

Questions No: 14/50

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

Questions No: 15/50

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

Questions No: 16/50

What will be the output of the following Python code?

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

Questions No: 17/50

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

Questions No: 18/50

What will be the output of the following Python code?

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

Questions No: 19/50

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

Questions No: 20/50

In which of the following data type, duplicate items are not allowed ?
निम्नलिखित में से किस डेटा प्रकार में डुप्लीकेट आइटम की अनुमति नहीं है?

Questions No: 21/50

"hello,world".[-6], what value print?
"hello,world".[-6], का आउटपुट क्या होगा?

Questions No: 22/50

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

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

Questions No: 23/50

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

print('11'.isnumeric())

Questions No: 24/50

What will be the output of the following Python code?

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

Questions No: 25/50

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

for i in [1, 2, 3, 4][::-1]:
    print (i)

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

What will be the output of the following Python code?

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

Questions No: 28/50

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

Questions No: 29/50

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

Questions No: 30/50

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

 a = {}
a[1] = 1
a['1'] = 2
a[1.0]=4
count = 0
for i in a:
    count += a[i]
print(count)
print(a)

Questions No: 31/50

Choose the correct option with respect to Python..
पायथन के संबंध में सही विकल्प चुनें।

Questions No: 32/50

What will be the output of the following Python code?

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

Questions No: 33/50

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

Questions No: 34/50

What is the output of following code

x = [10, 20, 30]
print(x * 0)

Questions No: 35/50

What is the output of the following program:

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

Questions No: 36/50

To retrieve the character at index 3 from string s=”Hello” what command do we execute (multiple answers allowed)?
स्ट्रिंग 3 = "हैलो" से इंडेक्स 3 पर character को रिट्रीव करने के लिए हम किस कमांड को एक्सक्यूट करते हैं (multiple answers allowed)?

Questions No: 37/50

Which of the following isn’t true about dictionary keys?
निम्नलिखित में से कौन ड़िक्शनरी keys के बारे में सही नहीं है?

Questions No: 38/50

What will be the output of the following Python code?

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

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

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

d1 = {"john":40, "peter":45}
d2 = {"john":466, "peter":45}
print(d1 == d2)

 

Questions No: 42/50

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

Questions No: 43/50

What will be printed?

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

Questions No: 44/50

What is the output of the following?

print(max([1, 2, 3, 4.] [4, 5, 6], [7]))

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

Which of the following methods is not a string method in Python?
निम्नलिखित में से कौन सा मेथड पायथन में एक स्ट्रिंग मेथड नहीं है?

Questions No: 47/50

Which of the following will delete key-value pair for key="tiger" in dictionary?

dic={"lion":"'wild","tiger":"'wild",'cat":"domestic","dog":"domestic"}

Questions No: 48/50

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

Questions No: 49/50

Given a string s="Welcome", which of the following code is incorrect ?
एक स्ट्रिंग s="Welcome" में निम्नलिखित में से कौन सा कोड गलत है?

Questions No: 50/50

What will be the output of the following Python code?

print("xyyzxyzxzxyy".count('xyy', 2, 11))