- 1
1. What will be the output? 1. >>> m = [[x, x + 1 , x + 2] for x in ran 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]
7 Answers
+ 2
You do not need 'ran' to answer this question. It is simply option b) as that is the only that option that has all the first members of the list to be consecutive. c) and d) are obviously wrong as they are printing a single list wile option a) has all its first members to be far apart. hope this helps.
0
What is the content of ran?
0
m=ranļ¼
0
If ran = [1,4,7], then it would be a, else if was ran = [1,2,3] it would be b. But because we don't know what ran is, we can never know.
0
ŠŠ¾ŃŠµŠ¼Ń Š²ŃŠµ ŠŗŠ¾Š¼Š¼ŠµŠ½ŃŠ°ŃŠøŠø Š°Š½Š³Š»ŠøŠ¹ŃŠŗŠøŠµ
0
ŠŃŃŠ“ом
- 1
What is the variable ran. You never included it.