4.
What is the use of the type() function? Give example.
Answers
Answered by
13
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
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
Math,
1 month ago
English,
1 month ago
Math,
3 months ago
Physics,
3 months ago
Social Sciences,
9 months ago