Computer Science, asked by chimmirisravya09, 6 months ago

9. What is the output of the following?
What is the expected output?
foo = [1,2,3,'a',None, (),[1,1
print(len(foo))
Pick ONE option
o syntax error
6
7
8.
ClearSelecom​

Answers

Answered by vanshika2453
2

Answer:

x = 123

for i in x:

print(i

Explanation:

Answer: c

Explanation: Objects of type int are not iterable.

Answered by qwnerazzuri
1

Syntax error (Option A)

Since in the first line, a python list is defined, as we know that in python the correct format for declaring a list is L = [1,2,3,'a'] but here the syntax is wrong so the syntax error will rise.

if the syntax was correct then it would have printed the length of the list.

Similar questions