Question discussion

Choose the correct output for the following Python code.tuple_var_mix = (“Example”, 1, “Tuple”) print (tuple_var_mix)

3485Medium DSSSB TGT Computer Science 0 replies 2 views
0

Choose the correct output for the following Python code.

tuple_var_mix = (“Example”, 1, “Tuple”)
print (tuple_var_mix)
  • A{Example, 1, Tuple}
  • B(Example, 1, tuple)
  • C(‘Example’, 1, ‘Tuple’)
  • D[Example, 1, ‘Tuple’]
Correct answer: C

Explanation

A tuple is printed in round brackets with strings in quotes: (‘Example’, 1, ‘Tuple’).

Discussion 0

Nobody has replied yet. Start the discussion!