What will be the output of the following Python code?
>>>m = [[x, x + 1, x + 2] for x in range(0, 3)]
a)	     [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
b)	    [[0, 1, 2], [1, 2, 3], [2, 3, 4]]
c)	     [1, 2, 3, 4, 5, 6, 7, 8, 9]
d)	      [0, 1, 2, 1, 2, 3, 2, 3, 4]
 Answer: b
						
						
												
							Related Posts
- The enumeration order becomes implementation dependent and non-interoperable if ___________
- What happens in the following javaScript code snippet?
 var count = 0;
 while (count < 10)
 {
 console.log(count);
 count++;
 }
- In the following switch syntax, the expression is compared with the case labels using which of the following operator(s)?
 switch(expression)
 {
 statements
 }
- The “var” and “function” are __________
- When an empty statement is encountered, a JavaScript interpreter __________
- What is a block statement in JavaScript?
- Which is a more efficient JavaScript code snippet?
 Code 1 :
 for(var num=10;num>=1;num–)
 {
 document.writeln(num);
 }
 Code 2 :
 var num=10;
 while(num>=1)
 {
 document.writeln(num);
 num++;
 }
Join The Discussion