Computer Science, asked by Najmatabassumjnv22, 6 months ago

17)What is use of type() function in Python and what is the output of following code
L = (34,67]
3
T=True
print(type(L))
print(type(T))​

Answers

Answered by deepanshumathur4798
2

It is used to display the type of object.

Moving forward, first of all, you would get an error in the l variable as you have to use the same brackets.

If you use () in l, the output in print(type(l)) will be 'tuple'

If you use [] in l, output will be 'list'

If you use {}in l, output will be 'dict' which stands for dictionary.

Output of print(type(t)) will be 'bool' which stands for boolean.

Hope this helps.

Please mark me brainliest.

Similar questions