πŸ“’ Too many exams? Don’t know which one suits you best? Book Your Free Expert πŸ‘‰ call Now!

  • google app store apple app store
  • βœ–

      Question

      Consider the following Python code: list_a = [1,

      2, 3] tuple_b = (4, 5) string_c = "hello" dict_d = {"key1": 1, "key2": 2} print(len(list_a) + len(tuple_b) + len(string_c) + len(dict_d)) What will be the output of this code?
      A 10 Correct Answer Incorrect Answer
      B 11 Correct Answer Incorrect Answer
      C 12 Correct Answer Incorrect Answer
      D 13 Correct Answer Incorrect Answer
      E 14 Correct Answer Incorrect Answer

      Solution

      Correct Answer: C (len(list_a)=3, len(tuple_b)=2, len(string_c)=5, len(dict_d)=2. Sum = 3+2+5+2 = 12.)

      Practice Next
      ask-question