Which of the following will show an error when creating a tuple?

9. Which of the following will show an error when creating a tuple?

  1. T1= "ram", "hello"," include help"
  2. T1=("ram",)
  3. T1=("ram")
  4. Three of them are correct

Answer: C) T1=("ram")

Explanation:

Among the given options, the third option is wrong. As to create a single element you have to put a comma after the element, else it would be a challenging job.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.