Computer Science, asked by assassin75, 1 year ago

What is the use of type function in python?

Answers

Answered by aditripathi1
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 vikas8552
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.
Similar questions