Classes in Python.
Class Definition:
A class is define with the keyword 'class' followed by userdefine class name and end with the colon (:) . All the statement which is present inside the class such as variable declaration of function.
Syntax:Every thing in the class is intended just like code in the function , loop, if statement etc.
Any thing not intended is not part of the class.
Write a program for a simple class demostration which print the message "hello"Objects are Mutable
"Ojects are mutable", this statement tells us that this state of object can be change at any pont of time by making changess to its attribute
Example:
Comments
Post a Comment