7
Question Question 1(g)
Find the output generated by following code fragments :
t2 = ('a')
type(t2)Output
<class 'str'>
Explanation
The type() function is used to get the type of an object. Here, 'a' is enclosed in parenthesis but comma is not added after it, hence it is not a tuple and belong to string class.