A

Admin • 833K Points
Coach

Q. What is the output of this code?

Code:
print(len(set('hello')))
  • (A) 5
  • (B) 4
  • (C) 3
  • (D) 2
  • Correct Answer - Option(B)
  • Views: 26
  • Filed under category Python
  • Hashtags:

Explanation by: Admin

Set removes duplicates, so `h, e, l, o` are unique characters.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.