What will be the output of the following code? | Tuples Que. 10

10. What will be the output of the following code?

tuple1 = ("tuple")  
print(type(tuple1))   
  1. <class 'str'>
  2. <class 'tuple'>
  3. Error

Answer: A) <class 'str'>

Explanation:

If you will create a single element tuple without a comma it will be considered a string.

Comments and Discussions!

Load comments ↻






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