निम्नलिखित पायथन फ़ंक्शन का आउटपुट क्या होगा?
What will be the output of the following Python function?
len(["hello", 2, 4, 6])
A)
B)
C)
D)
Explanation:
The function len()
returns the number of items in a list.
Here, the list is ["hello", 2, 4, 6]
, which contains 4 elements: "hello"
, 2
, 4
, and 6
.
So, the output will be 4
.
Answer: (B) 4