Types

https://www.codecademy.com/paths/computer-science/tracks/cspath-python-objects/modules/cspath-python-classes/lessons/data-types/exercises/types

image

Is type() a method of every class? If not, what is it?

Thank you in advance for your response! :smile:

You must select a tag to post in this category. Please find the tag relating to the section of the course you are on E.g. loops, learn-compatibility

When you ask a question, don’t forget to include a link to the exercise or project you’re dealing with!

If you want to have the best chances of getting a useful answer quickly, make sure you follow our guidelines about how to ask a good question. That way you’ll be helping everyone – helping people to answer your question and helping others who are stuck to find the question and answer! :slight_smile:

https://www.codecademy.com/paths/computer-science/tracks/cspath-python-objects/modules/cspath-python-classes/lessons/data-types/exercises/types

It’s a built-in function. A common (but incredibly useful) tool that has equivalents in most programming languages.

https://docs.python.org/3/library/functions.html

Also might want to read on duck typing :duck: :duck: :duck: :duck::

Conceptually, this type of typing (no pun intended) contrasts heavily with strong and static typed languages (like Haskell).

N.B.: Typing here doesn’t refer to keyboard typing, but rather how types are conceptualized and compiled.