Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

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
Comment

PREVIOUS NEXT
Code Example
Python :: python convert int to hex string 
Python :: python glfw 
Python :: hash table in python 
Python :: countplot for different classes in a column 
Python :: merge multiple excel files with multiple worksheets into a single dataframe 
Python :: list comprehesion python 
Python :: How to Get the Intersection of Sets in Python 
Python :: python decimal remove trailing zero 
Python :: paradigm meaning in python 
Python :: python flask how to remove last character from string 
Python :: substract list python 
Python :: python defaultdict to dict 
Python :: how to calculate the variance of all columns in python 
Python :: binary gap python 
Python :: python string cut left 
Python :: python turtle fill 
Python :: python file back to beginning 
Python :: python access key in dictionary 
Python :: how to iterate over a list in python 
Python :: python tkinter label widget 
Python :: python add comma each 3 digits format 
Python :: how to show mean values on histogram in seaborn 
Python :: python using re trimming white space 
Python :: python list directories only 
Python :: append to pythonpath 
Python :: distance of a point from a line python 
Python :: even numbers in python 
Python :: how to declare a class in python 
Python :: plt.hist using bins 
Python :: python pretty print list of tuples 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =