I am trying to print an object from a list based on my class settings.
from math import *
import time
class MyClass:
def __init__(self, name, age):
self.name = name
self.age = age
people = [MyClass("David",17),
MyClass("George",63),
MyClass("Zuck",12),
MyClass("Mark",18)
]
print(people[2])
But it prints out this: <main.MyClass object at 0x0000000003129128> I want it to print "Zuck"