class A:
def __init__(self, name, age):
self.name = name
self.age = age
a = A('jake', 22)
print(a.name, a.age)
from collections import namedtuple
B = namedtuple('Record', 'name, age')
b = B('bake', 20)
print(b.name, b.age)
c = dict(name='cake', age=21)
print(c['name'], c['age'])
To embed this project on your website, copy the following code and paste it into your website's HTML: