Suppose list1 is (3, 4, 5, 20, 5, 25, 1, 3), what is len(list1)
Python List Programming QuestionsWhat will be the output ?? numbers = [1, 2, 3, 4] a) 4 Show Answer b) 5 Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop() ?? a) [3, 4, 5, 20, 5, 25, 1] Show Answer a) [3, 4, 5, 20, 5, 25, 1] What will be the output of the following code ?? names1 = [‘Amir’, ‘Bala’, ‘Charlie’] a) None Show Answer d) c Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.pop(1) ?? a) [3, 4, 5, 20, 5, 25, 1, 3] Show Answer c) [3, 5, 20, 5, 25, 1, 3] Python List Programming Questions What will be the output of the following Python code ?? names1 = [‘Amir’, ‘Bala’, ‘Chales’] else: a) None Show Answer c) 2 Suppose listExample is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after listExample.extend([34, 5]) ?? a) [3, 4, 5, 20, 5, 25, 1, 3, 34, 5] Show Answer a) [3, 4, 5, 20, 5, 25, 1, 3, 34, 5] What is the output of the following Python code ?? def f(i, values = []): f(1) a) [1] [2] [3] Show Answer c) [1, 2, 3] Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1 after list1.reverse() ?? a) [3, 4, 5, 20, 5, 25, 1, 3] Show Answer d) [3, 1, 25, 5, 20, 5, 4, 3] Python List Programming Questions What will be the output of the following Python code ?? lst=[3,4,6,1,2] a) [3, 7, 8, 6, 1, 2] Show Answer a) [3, 7, 8, 6, 1, 2] What will be the output of the following code ?? points = [[1, 2], [3, 1.5], [0.5, 0.5]] a) [[1, 2], [3, 1.5], [0.5, 0.5]] Show Answer c) [[0.5, 0.5], [1, 2], [3, 1.5]] What will be the output of the following ?? b=[2,3,4,5] a) [2,4] Show Answer c) [3,5] What will be the output of the following Python code ?? data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] for row in m: print(ttt(data[0])) a) 1 Show Answer c) 4 Python List Programming Questions What will be the output of the code ?? a=[[]]*3 a) Syntax error Show Answer b) [[7], [7], [7]] What will be the output of the following code ?? data = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] a) 1 Show Answer d) 5 What will be the output of the following Python code ?? a=[1,2,3,4] a) 10 Show Answer d) [1,3,6,10] |