a = ['Mary', 'had', 'a', 'little', 'lamb'];
for i in range(len(a)): ... print i, a[i];
Answers
Answered by
6
Answer:
here
Explanation:
0 Mary
1 had
2 a
3 little
4 lamb
Answered by
0
0 Mary
1 had
2 a
3 little
4 lamb
Explanation:
- Here, an array has been given and the array here contains five elements with place value ranging from 0 to 4. A for loop has been opened and in the programming language of python, the length of a has been taken as range since the whole array will be traversed in order to print the desired output.
- Here, first i is given and then a[i], which means first the position of the array elements is printed and then the array elements are printed but both are printed simultaneously.
- Hence we get the output as,
0 Mary
1 had
2 a
3 little
4 lamb
Learn more about arrays
https://brainly.in/question/50128597
Learn more here
https://brainly.in/question/29234680
Similar questions
English,
4 months ago
Computer Science,
4 months ago
Math,
4 months ago
Science,
9 months ago
Math,
9 months ago