Answers for "python {object}"

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
-1

class in python

class LambdaClass: 
    x = lambda a, b, c, d, e, f: a + b + c + d + e + f
    print(x(31231, 312, 312, 31, 12, 31))

print(LambdaClass)
Posted by: Guest on March-31-2021

Python Answers by Framework

Browse Popular Code Answers by Language