Question #916

What is the output of the code snippet below?
print(tuple("(1,2,3"))

Watch the trap! When casting a string to a tuple, the tuple() function will create a tuple and insert each and every element of the string as an element for the tuple. (geeksforgeeks.org/python-convert-string-to-tuple)


Comment on Disqus:

Question difficulty: πŸ”΅πŸ”΅πŸ”΅πŸ”΅πŸ”΅


Similar questions: