Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

class python

class Person:
  def __init__(self, name, age):
    self.name = name
    self.age = age

p1 = Person("John", 36)

p1.age = 40

print(p1.age)
---------------------------------------------------------------
40
Source by codefreelance.net #
 
PREVIOUS NEXT
Tagged: #class #python
ADD COMMENT
Topic
Name
1+2 =