Which line will cause an error? 1. num=[5,4,3,[2],1] 2. print(num[0]) 3. print(num[3][0])
Answers
Answered by
0
Answer:
No lines will cause an error.
Explanation:
1. It defines a list named num.
2. It accesses the first element of the list num and prints it (output is 5).
3. It accesses the first element inside the third element, which itself is an inner list, of the outer list num (output is 2).
There's no sign of an error.
Similar questions
Hindi,
6 days ago
Hindi,
6 days ago
English,
12 days ago
India Languages,
12 days ago
Social Sciences,
8 months ago
Science,
8 months ago