What is the use of type function in python?
Answers
Answered by
3
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 stringfunctions or any other operations on it.type() with three arguments can be used to dynamically initialize classes or existing classes with attributes
assassin75:
thnx
Answered by
0
Python have a built-in method called as type which generally come in handy while figuring out the type of variable used in the program in the runtime.
If a single argument (object) is passed to type() built-in, it returns type of the given object. If three arguments (name, bases and dict) are passed, it returns a new type object.
If a single argument (object) is passed to type() built-in, it returns type of the given object. If three arguments (name, bases and dict) are passed, it returns a new type object.
Similar questions
English,
6 months ago
History,
6 months ago
Psychology,
1 year ago
Environmental Sciences,
1 year ago
Math,
1 year ago