create class syntax python code example
Example 1: 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()
Example 2: how to use class's in python
class person:
name = "jake"
age = 13
x = vars(person)
print(x)