Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python class

class Human():
    def __init__(self, _name, _age):
        self.name = _name
        self.age = _age

    def walk(self):
        print("walking...")

Person = Human('John', 32)
Person.walk()
Source by codefreelance.net #
 
PREVIOUS NEXT
Tagged: #python #class
ADD COMMENT
Topic
Name
3+5 =