what do we call the dot operator in pthon code example
Example: dot operator in python
# In python, almost everything is an object
# An object is defined in a class
# An object has methods (its own functions) and attributes (its own variables)
# So a dot refers to a method (followed by () to call the method) or an attribute (no () because it is a variable, non-callable object)
# For instance :
Dog.age # refers to the age of the "Dog" object. This is an attribute
Dog.bark() # is a method, it is an action defined in the Dog class
# You can find more informations about this by searching about classes