Q. What does the `len()` function do in Python?

  • (A) Returns the memory size of a variable
  • (B) Returns the length of an object
  • (C) Returns the last element of a list
  • (D) Returns the number of arguments in a function
πŸ’¬ Discuss
βœ… Correct Answer: (B) Returns the length of an object
Explanation: `len()` gives the total number of elements in an object like a list, string, tuple, etc.
Explanation by: Rati Dubey
`len()` gives the total number of elements in an object like a list, string, tuple, etc.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
70
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Rati Dubey
Publisher
πŸ“ˆ
88%
Success Rate