Question
What is the output of the following piece of code?a=list((45,)*4)print((45)*4)print(a)
Answer: Option C
Was this answer helpful ?
(45) is an int while (45,) is a tuple of one element. Thus when a tuple is multiplied, it created references of itself which is later converted to a list.
Was this answer helpful ?
Submit Solution