>>> a = {1, 2, {3, 4}}
>>> len(a)
- 3
- 4
- error
Write your answer in comment with explaination
We're a place where coders share, stay up-to-date and grow their careers.
>>> a = {1, 2, {3, 4}}
>>> len(a)
Write your answer in comment with explaination
seanpgallivan -
YJDoc2 -
Nick Bull -
Dayna S -
Discussion (5)
Bad order of answers. "3" is ambiguous.
would be much better
Correct
A is parsed as set with three values: two integers and another set. Thus it gives a Len of 3
3