ExamVeda
Login
Home
11
What will be the output of the following Python code snippet?
print([i.lower() for i in "HELLO"])
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
12
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 = " ")
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
13
What will be the output of the following Python code?
A = [[1, 2, 3],
          [4, 5, 6],
          [7, 8, 9]]
A[1]
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
14
What will be the output of the following Python code?
list1 = [1, 2, 3, 4]
list2 = [5, 6, 7, 8]
 
print(len(list1 + list2))
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
15
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)
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
16
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))
Discuss
Answer & Solution
Answer: Option C
No explanation is given for this question. Let's Discuss on Board
17
What will be the output of the following Python code?
x=[[1],[2]]
print(" ".join(list(map(str,x))))
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
18
What will be the output of the following Python code?
a=[1,2,3,4]
b=[sum(a[0:x+1]) for x in range(0,len(a))]
print(b)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board
19
What will be the output of the following Python code?
A = [[1, 2, 3],
     [4, 5, 6],
     [7, 8, 9]]
 
[[col + 10 for col in row] for row in A]
Discuss
Answer & Solution
Answer: Option A
No explanation is given for this question. Let's Discuss on Board
20
What will be the output of the following Python code?
a=[1,2,3,4]
b=[sum(a[0:x+1]) for x in range(0,len(a))]
print(b)
Discuss
Answer & Solution
Answer: Option D
No explanation is given for this question. Let's Discuss on Board