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

  • (A) Returns the number of items in an object
  • (B) Returns the memory size of the object
  • (C) Deletes an object
  • (D) Converts object to string
πŸ’¬ Discuss
βœ… Correct Answer: (A) Returns the number of items in an object
Explanation: len() gives the count of items in lists, tuples, strings, and other iterable objects.
Explanation by: Ankit Singh
len() gives the count of items in lists, tuples, strings, and other iterable objects.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
97
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ankit Singh
Publisher
πŸ“ˆ
86%
Success Rate