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
English,
2 months ago
English,
2 months ago
Math,
4 months ago
Physics,
4 months ago
Social Sciences,
10 months ago