Python - Working With List
Questions No: 1/50

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

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

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: 4/50

What will be the output of the following Python code?

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

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

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

Questions No: 8/50

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

Questions No: 9/50

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

Questions No: 10/50

What will be the output of the following Python code?

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

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

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

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

What will be the output of the following ?

print((range(4)))

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

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

Questions No: 17/50

What is the output of the following code:

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

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

What will be the output of the following Python code?

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

Questions No: 20/50

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

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

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

Questions No: 24/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: 25/50

What will be the output of the following Python code?

places = ['Bangalore', 'Mumbai', 'Delhi']
places1 = places
places2 = places[:]
places1[1]="Pune"
places2[2]="Hyderabad"
print(places)

Questions No: 26/50

What will be the output of the following code?

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

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

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

Questions No: 29/50

Suppose i is 5 and j is 4, i + j is same as ________
मान लीजिए कि i 5 है और j 4 है, i + j ________ के समान है

Questions No: 30/50

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

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?

 word1="Apple"
word2="Apple"
list1=[1,2,3]
list2=[1,2,3]
print(word1 is word2)
print(list1 is list2)

Questions No: 33/50

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

Questions No: 34/50

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

Questions No: 35/50

What is the correct command to shuffle the following list?

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

Questions No: 36/50

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

Questions No: 37/50

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

Questions No: 38/50

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

Questions No: 39/50

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

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

What will be the output of the following Python code?

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

Questions No: 44/50

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

Questions No: 45/50

What will be the output of the following Python code?

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

Questions No: 46/50

What is the output when we execute

list("hello") ? 

Questions No: 47/50

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

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 lst in values:
    for element in lst:
        if v > element:
            v = element
print(v)

Questions No: 49/50

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

Questions No: 50/50

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