31
Question Question 7
Predict the output.
tuple1 = ('Python') * 3
print(type(tuple1))
Output
<class 'str'>
Explanation
This is because tuple1 is not a tuple but a string. To make tuple1 a tuple it should be initialized as following:tuple1 = ('Python',) * 3
i.e. a comma should be added after the element.