Python - Working With List
Questions No: 1/50

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

Questions No: 2/50

What will be the output of the following Python code?

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

Questions No: 3/50

To remove string “hello” from list1, we use which command?
लिस्ट1 से स्ट्रिंग &quot;हैलो&quot; को रिमूव करने के लिए, हम किस कमांड का यूज़ करते हैं?

Questions No: 4/50

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

Questions No: 5/50

What happens if you attempt to access an index that is out of range in a list?
यदि आप किसी ऐसे इंडेक्स तक पहुँचने का प्रयास करते हैं जो किसी लिस्ट के रेंज से बाहर है तो क्या होगा?

Questions No: 6/50

What function do you use to read a string?
एक स्ट्रिंग को रीड करने के लिए आप किस फ़ंक्शन का यूज़ करते हैं?

Questions No: 7/50

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

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

Which method is used to add an element to the end of a list?
किसी लिस्ट के एन्ड में कोई एलिमेंट्स जोड़ने के लिए किस मेथड का यूज़ किया जा

Questions No: 10/50

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

Questions No: 11/50

Which of the following methods will create a copy of a list?
निम्नलिखित में से कौन सा मेथड किसी लिस्ट की एक कॉपी क्रिएट करेगी ?

Questions No: 12/50

What is the output when we execute

list("hello") ? 

Questions No: 13/50

Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)?
मान लीजिए कि list1 [3, 4, 5, 20, 5] है, list1.index (5) क्या है?

Questions No: 14/50

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

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

What is the output when we execute list(“hello”)?
जब हम लिस्ट (&quot;हैलो&quot;) एक्सक्यूट करते हैं तो आउटपुट क्या है?

Questions No: 17/50

Which statement is correct
कौन सा कथन सही है

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

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

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

What will be the output of the following Python code?

data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]]
def ttt(m):
    v = m[0][0]
    for row in m:
        for element in row:
            if v < element: v = element     
        return v
print(ttt(data[0]))

Questions No: 23/50

Which of the following commands will create a list?
निम्नलिखित में से कौन सी कमांड एक लिस्ट क्रिएट करेगी ?

Questions No: 24/50

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

Questions No: 25/50

What will be the output of the following ?

print((range(4)))

Questions No: 26/50

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

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

what is the output of the following code?

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

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

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

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

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

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

Questions No: 33/50

Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:
मान लीजिए कि list1 = [0.5 * x for x in range(0, 4)], list1 है:

Questions No: 34/50

What will be the output of the following Python code?

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

Questions No: 35/50

Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?
मान लीजिए लिस्ट [3, 4, 5, 20, 5, 25, 1, 3], है, listExample.pop(1) के बाद की लिस्ट1 क्या है।

Questions No: 36/50

What is the output of the following code:

L=['a','b','c','d']
print ( "".join(L))

Questions No: 37/50

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

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

Which statement is correct??
कौन सा कथन सही है??

Questions No: 40/50

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

Questions No: 41/50

What will be the output of the following Python code?

x = ['ab', 'cd']
for i in x:
    i.upper() 
print(x)

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

What data type is the object below ?

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

Questions No: 44/50

which function is used to remove last item from a list?
किसी लिस्टसे अंतिम आइटम को हटाने के लिए किस फ़ंक्शन का उपयोग किया जाता है?

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

Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is the value of list1.count(5)?
मान लीजिए list1 [3, 4, 5, 20, 5, 25, 1, 3], है, list1.count(5) की क्या वैल्यू है।

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

To insert 5 to the third position in list1, we use which command?
लिस्ट 1 में 5 से थर्ड पोज़िशन पर इन्सर्ट करने के लिए, हम किस कमांड का यूज़ करते हैं?

Questions No: 49/50

What will be the output of the following Python code?

myList = [1, 5, 5, 5, 5, 1]
max = myList[0]
indexOfMax = 0
for i in range(1, len(myList)):
    if myList[i] > max:
        max = myList[i]
        indexOfMax = i   
print(indexOfMax)

Questions No: 50/50

What is the output of the following code?

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