Important Notice:
List in Python
1 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?lst=[3,4,6,1,2]lst[1:2]=[7,8]print(lst)
2 / 120
Which of the following will give output as [23,2,9,75] ?निम्नलिखित में से कौन सा आउटपुट [23,2,9,75] देगा?If list1=[6,23,3,2,0,9,8,75]
3 / 120
What will be the output of below Python code?नीचे दिए गए पायथन कोड का आउटपुट क्या होगा?list1=[8,0,9,5]print(list1[::-1])
4 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?lst=[[1,2],[3,4]]print(sum(lst,[]))
5 / 120
What is the output when we execute list(“hello”)?जब हम list(“hello”) निष्पादित करते हैं तो आउटपुट क्या होता है?
6 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>list1 =[1, 3]>>>list2 = list1>>>list1[0]=4>>>print(list2)
7 / 120
Suppose list1 is [1, 5, 9], what is sum(list1)?मान लीजिए list1 [1, 5, 9] है, तो sum(list1) क्या है?
8 / 120
What is the output of following code ?निम्नलिखित कोड का आउटपुट क्या होगा?A=[[1,2,3],[4,5,6],[7,8,9]]print(A[1][:])
9 / 120
To shuffle the list(say list1) what function do we use?सूची (मान लीजिए list1) को शफ़ल करने के लिए हम किस फ़ंक्शन का उपयोग करते हैं?
10 / 120
To remove string “hello” from list1, we use which command?list1 से स्ट्रिंग “हैलो” हटाने के लिए हम किस कमांड का उपयोग करते हैं?
11 / 120
Suppose list1 = [0.5 * x for x in range(0, 4)], list1 is:मान लीजिए list1 = [0.5 * x for x in range(0, 4)], list1 है:
12 / 120
13 / 120
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 सूची के आइटम क्या होंगे?
14 / 120
Suppose list1 is [3, 4, 5, 20, 5], what is list1.index(5)?मान लीजिए list1 [3, 4, 5, 20, 5] है, तो list1.index(5) क्या है?
15 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?names1 =['Amir', 'Bala', 'Chales']if'amir' in names1:print(1)else:print(2)
16 / 120
Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?मान लीजिए list1 [3, 5, 25, 1, 3] है, तो न्यूनतम(list1) क्या है?
17 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>> a=[14,52,7]>>>> b=a.copy()>>> b is a
18 / 120
Suppose list1 is [1, 3, 2], What is list1 * 2?मान लीजिए सूची1 [1, 3, 2] है, सूची1 * 2 क्या है?
19 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?a=[10,23,56,[78]]b=list(a)a[3][0]=95a[1]=34print(b)
20 / 120
Suppose list1 is [2, 33, 222, 14, 25], What is list1[-1]?मान लीजिए list1 [2, 33, 222, 14, 25] है, list1 [-1] क्या है?
21 / 120
22 / 120
To insert 5 to the third position in list1, we use which command?सूची 1 में तीसरे स्थान पर 5 सम्मिलित करने के लिए, हम किस कमांड का उपयोग करते हैं?
23 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?list1 = [1, 2, 3, 4]list2 = [5, 6, 7, 8]print(len(list1 + list2))
24 / 120
What data type is the object below ?नीचे दिया गया ऑब्जेक्ट किस प्रकार का डेटा हैL=[1, 23, 'hello', 1]
25 / 120
Suppose list1 is [4, 2, 2, 4, 5, 2, 1, 0], Which of the following is correct syntax for slicing operation?मान लीजिए list1 [4, 2, 2, 4, 5, 2, 1, 0] है, स्लाइसिंग ऑपरेशन के लिए निम्नलिखित में से कौन सा सही सिंटैक्स है?
26 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>list("a#b#c#d".split('#'))
27 / 120
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 क्या है?
28 / 120
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,60print(a)
29 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
matrix = [[1, 2, 3, 4], [4, 5, 6, 7], [8, 9, 10, 11], [12, 13, 14, 15]]for i in range(0, 4): print(matrix[i][1], end = " ")
30 / 120
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5])?मान लीजिए listExample [3, 4, 5, 20, 5, 25, 1, 3] है, तो listExample.extend([34, 5]) के बाद list1 क्या है?
31 / 120
How many elements are in m?कितने तत्व m में हैं?m = [[x, y] for x in range(0, 4) for y in range(0, 4)]
32 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>names = ['Amir', 'Bear', 'Charlton', 'Daman']>>>print(names[-1][-1])
33 / 120
What will be the output of below Python code?नीचे दिए गए पायथन कोड का आउटपुट क्या होगा?list1=["tom","mary","simon"]list1.insert(5,8)print(list1)
34 / 120
35 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>list1 = [1, 3]>>>list2 = list1>>>list1[0] = 4>>>print(list2)
36 / 120
37 / 120
what is the output of the following ?निम्नलिखित कोड का आउटपुट क्या होगा?print(max([1,2,3,4],[4,5,6],[7]))
38 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?import copya=[10,23,56,[78]]b=copy.deepcopy(a)a[3][0]=95a[1]=34print(b)
39 / 120
What is the correct command to shuffle the following list?निम्नलिखित सूची को शफ़ल करने के लिए सही कमांड क्या है?fruit=['apple', 'banana', 'papaya', 'cherry']
40 / 120
Suppose list1 is [2445,133,12454,123], what is max(list1)?मान लीजिए list1 [2445,133,12454,123] है, तो अधिकतम(list1) क्या है?
41 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?numbers = [1, 2, 3, 4]numbers.append([5,6,7,8])print(len(numbers))
42 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?names1 =['Amir', 'Bala', 'Charlie']names2 =[name.lower()for name in names1]print(names2[2][0])
43 / 120
Suppose list1 is [2, 33, 222, 14, 25], What is list1[:-1]?मान लीजिए list1 [2, 33, 222, 14, 25] है, list1 [:-1] क्या है?
44 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?a=[1,2,3]b=a.append(4)print(a)print(b)
45 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>list1 = [11, 2, 23]>>>list2 = [11, 2, 2]>>>list1 < list2
46 / 120
47 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?list1 =[1, 2, 3, 4]list2 =[5, 6, 7, 8]print(len(list1 + list2))
48 / 120
49 / 120
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop()?मान लीजिए listExample [3, 4, 5, 20, 5, 25, 1, 3] है, तो listExample.pop() के बाद list1 क्या है?
50 / 120
51 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?a=[[]]*3a[1].append(7)print(a)
52 / 120
53 / 120
To add a new element to a list we use which command?किसी सूची में नया एलिमेंट जोड़ने के लिए हम किस कमांड का उपयोग करते हैं?
54 / 120
Suppose list1 is [1, 3, 2], What is list1 * 2?मान लीजिए list1 [1, 3, 2] है, list1 * 2 क्या है?
55 / 120
def f(i, values = []): values.append(i) return values f(1)f(2)v = f(3)print(v)
56 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>"Welcome to Python".split()
57 / 120
Which is not true:जो सत्य नहीं है:
58 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?b=[2,3,4,5]a=list(filter(lambda x:x%2,b))print(a)
59 / 120
Find the output of the following python programs?निम्नलिखित पायथन प्रोग्राम का आउटपुट ज्ञात करें
x=['ab','cd']for i in x: i.upper()print(x)
60 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?a=165b=sum(list(map(int,str(a))))print(b)
61 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?a=[13,56,17]a.append([87])a.extend([45,67])print(a)
62 / 120
Suppose listExample is [‘h’,’e’,’l’,’l’,’o’], what is len(listExample)?मान लीजिए listExample [‘h’,’e’,’l’,’l’,’o’] है, तो len(listExample) क्या है?
63 / 120
Which method is best to use when adding an item to the end of a list?किसी सूची के अंत में कोई आइटम जोड़ते समय कौन सी विधि सर्वोत्तम है?
64 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?def addItem(listParam): listParam += [1]mylist = [1, 2, 3, 4]addItem(mylist)print(len(mylist))
65 / 120
66 / 120
what will be the output of following?निम्नलिखित कोड का आउटपुट क्या होगा?Y=[2,5J,6]Y.sort()
67 / 120
68 / 120
what will be the output of the following code snippet?निम्नलिखित कोड का आउटपुट क्या होगा?print([i.lower() for i in “HELLO”])
69 / 120
Which of the following commands will create a list?निम्नलिखित में से कौन सा आदेश सूची बनाएगा?
70 / 120
71 / 120
To insert 5 to the third position in list1, we use which command?list1 में तीसरे स्थान पर 5 सम्मिलित करने के लिए, हम किस कमांड का उपयोग करते हैं?
72 / 120
Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1)?मान लीजिए listExample [3, 4, 5, 20, 5, 25, 1, 3] है, तो listExample.pop(1) के बाद list1 क्या है?
73 / 120
Which method would you use to figure out the position of an item in a list?किसी सूची में किसी आइटम की स्थिति जानने के लिए आप कौन सी विधि का उपयोग करेंगे?
74 / 120
How to copy one list to another in Python ?पायथन में एक सूची को दूसरे सूची में कैसे कॉपी करें?
75 / 120
76 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?veggies = ['carrot', 'broccoli', 'potato', 'asparagus']veggies.insert(veggies.index('broccoli'), 'celery')print(veggies)
77 / 120
78 / 120
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?मान लीजिए list1 [3, 4, 5, 20, 5, 25, 1, 3] है, तो list1.count(5) क्या है?
79 / 120
Suppose a list with name arr, contains 5 elements. You can get the 2nd element from the list using :मान लीजिए कि arr नामक सूची में पाँच एलीमेंट्स हैं। आप सूची में दूसरा एलीमेंट ..........के उपयोग से प्राप्त कर सकते हैं।
80 / 120
What will be the output of below Python code?नीचे दिए गए पायथन कोड का आउटपुट क्या होगा?list1=[1,3,5,2,4,6,2]list1.remove(2)print(sum(list1))
81 / 120
82 / 120
def f(values): values[0] = 44 v = [1, 2, 3]f(v)print(v)
83 / 120
84 / 120
What is the output of the following code:निम्नलिखित कोड का परिणाम क्या है:L=[‘a’,’b’,’c’,’d’]print ( “”.join(L))
85 / 120
Which of the following would give an error?निम्नलिखित में से कौन सा त्रुटि देगा?
86 / 120
def unpack(a,b,c,d): print(a+d)x = [1,2,3,4]unpack(*x)
87 / 120
To which of the following the “in” operator can be used to check if an item is in it?निम्नलिखित में से किसके लिए “in” ऑपरेटर का उपयोग यह जांचने के लिए किया जा सकता है कि कोई आइटम इसमें है या नहीं?
88 / 120
Which of the following commands will create a list?निम्नलिखित में से कौन सा कमांड एक सूची बनाएगा?
89 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?numbers =[1, 2, 3, 4]numbers.append([5,6,7,8])print(len(numbers))
90 / 120
91 / 120
What is the output when we execute list("hello") ?जब हम लिस्ट (“hello”) निष्पादित करत हैं तो आउटपुट क्या होता है?
92 / 120
To remove string “hello” from list1, we use which command?सूची 1 से स्ट्रिंग “हैलो” हटाने के लिए हम किस कमांड का उपयोग करते हैं?
93 / 120
To add a new element to a list we use which command?किसी सूची में नया तत्व जोड़ने के लिए हम किस कमांड का उपयोग करते हैं?
94 / 120
95 / 120
What will be the output of following code ?निम्नलिखित कोड का आउटपुट क्या होगा?x = ['XX', 'YY']for i in xi.lower()print(x)
96 / 120
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)
97 / 120
The marks of a student on 6 subjects are stored in a list, list1=[80,66,94,87,99,95]. How can the student's average mark be calculated?एक छात्र के 6 विषयों के अंक एक सूची में संग्रहीत हैं, सूची 1=[80,66,94,87,99,95]। छात्र के औसत अंक की गणना कैसे की जा सकती है?
98 / 120
what will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?len([“hello”,2, 4, 6])
99 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?names1 = ['Amir', 'Bala', 'Charlie']names2 = [name.lower() for name in names1]print(names2[2][0])
100 / 120
101 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>list1 =[11, 2, 23]>>>list2 =[11, 2, 2]>>>list1 < list2
102 / 120
103 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?print(list(zip((1,2,3),('a'),('xxx','yyy'))))print(list(zip((2,4),('b','c'),('yy','xx'))))
104 / 120
105 / 120
106 / 120
107 / 120
108 / 120
which function is used to add an element(5) in the list1?लिस्ट 1 में एक एलिमेंट (5) जोड़ने के लिए फंक्शन का उपयोगक किया जाता है?
109 / 120
What will be the output of following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?list1=["Python","Java","c","C","C++"]print(min(list1))
110 / 120
Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?मान लीजिए सूची1 [3, 4, 5, 20, 5, 25, 1, 3] है, तो सूची1.count(5) क्या है?
111 / 120
What is the output of the following piece of code?निम्नलिखित कोड का आउटपुट क्या है?a=list((45,)*4)print((45)*4)print(a)
112 / 120
113 / 120
What will be the result after the execution of above Python code?उपरोक्त पायथन कोड के निष्पादन के बाद परिणाम क्या होगा?list1=[3,2,5,7,3,6]list1.pop(3)print(list1)
114 / 120
names1 = ['Amir', 'Bala', 'Chales']if 'amir' in names1: print(1)else: print(2)
115 / 120
116 / 120
what will be the output of the following python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>list1=[1,3]>>>list2=list1>>>list1[0]=4>>>print(list2)
117 / 120
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 = " ")
118 / 120
What is the data type of following object ?निम्नलिखित ऑब्जेक्ट का डेटाटाइप क्या है?A = [5,‟abc‟,3.2,6]
119 / 120
what is the output of the following code?निम्नलिखित कोड का आउटपुट क्या होगा?M=[‘b’ * x for x in range(4)]print(M)
120 / 120
What will be the output of the following Python code?निम्नलिखित पायथन कोड का आउटपुट क्या होगा?>>>m = [[x, x + 1, x + 2] for x in range(0, 3)]
Your score is
The average score is 58%
Restart quiz