Choose the correct output for the following Python code. tuple_var_mix = (“Example”, 1, “Tuple”)
Choose the correct output for the following Python code.
tuple_var_mix = (“Example”, 1, “Tuple”)
print (tuple_var_mix)
Show answerHide answer
Correct answer: (C) (‘Example’, 1, ‘Tuple’)
Explanation
print() of a tuple shows its repr: parentheses, with strings in single quotes, so the output is ('Example', 1, 'Tuple').