Answers for "what is the class object in pythno"

4

python class

class Person:
  def __init__(self, name, age):
    self.name = name
    self.age = age
  def myfunc(self):
    print("Hello my name is " + self.name +".")

p1 = Person("Victor", 24)
p1.myfunc()
Posted by: Guest on April-30-2021
6

what is an object in python

#objects are collections of data
Posted by: Guest on July-19-2020

Code answers related to "what is the class object in pythno"

Python Answers by Framework

Browse Popular Code Answers by Language