Computer Science, asked by Priyaurmaliya39, 4 months ago

4.
What is the use of the type() function? Give example.​

Answers

Answered by Braɪnlyємρєяσя
13

\huge {\mathbb ♡{\orange{ANSWER}\green{♡}\pink{}\blue{!}}}♡

type() function can be used at that point to determine the type of text extracted and then change it to other forms of string before we use string functions or any other operations on it. type() with three arguments can be used to dynamically initialize classes or existing classes with attributes.

thanks u ❤️

Answered by manasvinshrimali
0

Answer:

type() function is mostly used for debugging purposes. Two different types of arguments can be passed to type() function, single and three argument. If single argument type(obj) is passed, it returns the type of given object. If three arguments type(name, bases, dict) is passed, it returns a new type object

Similar questions